Jump to content

[SOLVED] File Renaming/Extracting


mcmuney

Recommended Posts

I'm using a script to upload photos, during the upload it adds additional information to the original filename, for example:

 

$_GET['file_name']=$time."_".$mem_id._.$_GET['file_name'];
$rfn=$_SERVER['DOCUMENT_ROOT']."/images/".$_GET['file_name'];

 

So, if the filename was abc.jpg, it will upload it as 1177799496_1_abc.jpg.

 

PROBLEM: When there's a [] in the file name, like abc[1].jpg, having the [] causes a load issue. What can I add to remove the [] from the file during the rename process?

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/168242-solved-file-renamingextracting/
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.