Renaming file on upload..?
Posted: Fri Dec 06, 2002 5:17 am
Using this script am I able to change the name of the file apon upload.
My aim is so that users can upload jpeg of any file name and they will get renamed to 'fubar001, fubar-002'
Please help
Thanks
Code: Select all
<?php
if(!(copy($_FILESї'userfile']ї'tmp_name'], "Upload/" . $_FILESїfilename']ї'name']))) die("Cannot upload files.");
echo "Upload Complete!";
?>Please help
Thanks