Try this:
$file = "/usr/blah/doh/yuck/wow/abigfile.html";
$file = basename($file);
It will returns abigfile.html
That´s it
Regards
Alex
At 16:04 24/4/2002 -0400, ROBERT MCPEAK wrote:
>I need code that grabs the file at the end of a file path.
>I have this:
>
>/usr/blah/doh/yuck/wow/abigfile
Try this, not the most efficient way.
$names = explode("/", /usr/blah/);
last_element = sizeof($names)-1;
$name[last_element] = abigfile
> I need code that grabs the file at the end of a file path.
> I have this:
>
> /usr/blah/doh/yuck/wow/abigfile.html
>
> And would like to return this:
>
On Thursday 25 April 2002 04:04, ROBERT MCPEAK wrote:
> I need code that grabs the file at the end of a file path.
> I have this:
>
> /usr/blah/doh/yuck/wow/abigfile.html
>
> And would like to return this:
>
> abigfile.html
Manual > Filesystem functions
--
Jason Wong -> Gremlins Associates -> w
On Wednesday, April 24, 2002, at 04:04 PM, ROBERT MCPEAK wrote:
> I need code that grabs the file at the end of a file path.
> I have this:
>
> /usr/blah/doh/yuck/wow/abigfile.html
>
> And would like to return this:
>
> abigfile.html
>
> Could somebody show me how to do this?
http://www.php.n
I need code that grabs the file at the end of a file path.
I have this:
/usr/blah/doh/yuck/wow/abigfile.html
And would like to return this:
abigfile.html
Could somebody show me how to do this?
Thank you!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php
5 matches
Mail list logo