Jump to content

Basename not working in windows


vicodin

Recommended Posts

Ok so im trying to make a script that grabs the basename of a file in windows. It will always be run locally on the machine so when i used the function it is messing up. Im guessing it has something to do with the space?

 

Example:

$path="C:\Documents and Settings\office\Desktop\Web Design\CSVtoJPG Rename\test.txt";

echo basename($path);

Output is: CSVtoJPG Rename est.txt

 

Any help anyone?

 

Link to comment
https://forums.phpfreaks.com/topic/148189-basename-not-working-in-windows/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.