manage a string for take namefile
if by PHP_SELF
I have some similar:
/localhost/namefile.php
is possible to extract only this :
namefile.php
(is possible also have only namefile -no extension-)
or is there a specific function?
Re: manage a string for take namefile
"artev" <mailnotspammm [at] notspamm.nn> wrote in message
news:fg6v3b3760c9.4su5n243fc2h.dlg [at] 40tude.net...
> if by PHP_SELF
> I have some similar:
> /localhost/namefile.php
> is possible to extract only this :
> namefile.php
>
> (is possible also have only namefile -no extension-)
>
> or is there a specific function?
pathinfo
Re: manage a string for take namefile
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