You are here: Re: manage a string for take namefile « All PHP « IT news, forums, messages
Re: manage a string for take namefile

Posted by J.O. Aho on 10/03/07 16:34

artev wrote:
> if by PHP_SELF
> I have some similar:
> /localhost/namefile.php
> is possible to extract only this :
> namefile.php

pathinfo()
http://www.php.net/manual/en/function.pathinfo.php

> (is possible also have only namefile -no extension-)
>
> or is there a specific function?

basename(), if you know the extention
http://www.php.net/manual/en/function.basename.php

list($filename,$extension)=explode('.',$file);
if you are sure there is only one '.' in the files name.

--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация