PHPycho
01-09-2006, 05:27 AM
i had a photo gallery for users where users can upload many photos..
I am writing an script that renames the files while uploading as
$new_filename=$user_id."_"."uniqueNO";
$new_add=$new_filename.".jpg";
rename($old_add,$new_add);
problem??
>how to generate "uniqueNO" that never repeats?
>is there any function??
>this script changes any file extension to .jpg...is that good or else?
Plz help in solving above questions....
Thank U
I am writing an script that renames the files while uploading as
$new_filename=$user_id."_"."uniqueNO";
$new_add=$new_filename.".jpg";
rename($old_add,$new_add);
problem??
>how to generate "uniqueNO" that never repeats?
>is there any function??
>this script changes any file extension to .jpg...is that good or else?
Plz help in solving above questions....
Thank U