|
|||||||
| PHP Discussion and technical support for using and deploying PHP based websites. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
[RESOLVED]bokeh's uploader - slight amendment
I used bokeh's uploader tute' to make an uploader that keeps a log in mysql which keeps track of the file names and then calls them back (an image gallery). Only thing is when I upload, the files all have weird numbers prefixing the filename "1141744557-test.gif" for example. Can anyone tell me what these numebr are, why they're there and what my options are to get rid of them?
Thanks Last edited by Dopple; 03-15-2006 at 03:01 AM. |
|
#2
|
|||
|
|||
|
the number is there so you donīt overwrite existing files that have the same name. it is done here:
PHP Code:
__________________
free music: comatronic |
|
#3
|
||||
|
||||
|
You can do as you please with the naming of the files. I chose to prefix the filename with a unix timestamp. The benifits are many. First the filenames will be unique; when doing a directory read the files will be listed in the order they were uploaded; and even if we are not using a database it is still simple to go into the image directory and get a list of files that were uploaded between two specific dates.
__________________
Email me | CAPTCHA verification script | DNS speed test | Email address tester | Regex checker | PHP scripts | Do it yourself avatars Cruft free domain names | English Spanish Translation | Watermarking images | Freelance | Texas Holdem Poker Probability Calculator Last edited by bokeh; 03-08-2006 at 05:57 PM. |
|
#4
|
||||
|
||||
|
Thanks. I see that now. I was just putting the original file name into the database! much appreciated guys.
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|