Jump to content

Explode/Parsing a filepath help


savagenoob

Recommended Posts

I am passing a filepath into a variable like "D:\Example\Next\~3880-0.TMP" and need to strip everything but the file name. For a reason unknown to me, PHP is throwing an error while trying to explode \ like "$File=explode("\",$string);", then I was going to use end() to get to the last part of the array, but its not working. Thanks

Link to comment
https://forums.phpfreaks.com/topic/201587-explodeparsing-a-filepath-help/
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.