File copying help
Posted 02 August 2006 - 09:48 PM
I am trying to change one file in about 300 directories, all of which reside in one main directory. The file is the same in each. Is there a way to copy a new file into each of these directories to overwrite the old one automatically using php?
Thanks in advance,
Posted 02 August 2006 - 10:24 PM
Cant you just always link to the same one?
Posted 03 August 2006 - 04:44 AM
Posted 03 August 2006 - 05:00 AM
or [php] * 1000... PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...
Posted 03 August 2006 - 05:46 AM
Either way, I still need a way to change what's currently there, as there are over 300 members with pictures and going through each and changing it is a complete nightmare. The site is live and I couldn't just go and delete everyone's current pictures.
Thanks for the replies,
Posted 03 August 2006 - 10:20 AM
Get the Unique User ID number
Get a DateStamp
I normally only have one upload as its for profiles so this will do for me
$user_id = $id; //This is the users unique ID $stamp = date("Y-m-d H:i:s"); $new_file_name = $id."_".$date.".".$ext
The name is always unique, this stops against accidently overwriting.
//I Normally get the file ext, to check it is jpg || gif..... That is what the $ext is
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users