Jump to content

Stripping folder name from variable


alanl1

Recommended Posts

Hi professionals

 

 

I am passing a variable through to a page and it shows the filename and folder

 

 

$newname = $_GET['newname'];  //The Uploads/ folder will need to be stripped here to retreive the filename...
echo "the filename is " . $newname;

$sql = "exec importSAR " . "'" . "$newname" . "'";

 

 

exec importSAR 'uploads/output.csv'

 

 

 

I only want it to show the filename for my stored procedure

 

 

so it says

 

exec importSAR 'output.csv'

 

 

can this be done, can the uploads/ part be removed

 

 

 

thanks in advance

 

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/278302-stripping-folder-name-from-variable/
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.