|
Posted by Dynamo on 10/16/44 11:48
Yes I'm sure. It is not move_uploaded_file that is causing the problem. It is
the rename function that is causing the headache. To explain better, lets say
I'm uploading a picture called mypicture.jpg. There is nothing in the uploaded
filename that associates it with a record in a mysql table. So once the file has
been uploaded I then rename it as 21.jpg by using
rename('mypicture.jpg','21.jpg')
I can now associate 21.jpg with a record in my table where the id=21
The problem lies in the fact that at some point in time I might want to change
the picture that is asscociated with this record. In that instance if I use
rename('mynewpicture.jpg','21.jpg')
then 21.jpg already exists and I get a warning message that the file already
exists and hence is not renamed.
Hope that explains it more fully.
Regards
Dynamo
In article <1148544647.197533.326110@u72g2000cwu.googlegroups.com>, Sjoerd
says...
>
>Are you sure? The documentation for move_uploaded_file says:
>> If the destination file already exists, it will be overwritten.
Navigation:
[Reply to this message]
|