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]
|