Nathan Riley
asked on
Appending Date/Time to File Upload
How do I add a date and time to the end of my file upload?
Currently I've tried:
How can I do this so that it will be filename2014-01-06 12:01:05.jpg
Currently I've tried:
move_uploaded_file($_FILES["file"]["tmp_name"],
"uploads/".$orgid."/".$_FILES["file"]["name"].date("Y-m-d H:i:s"));
This doesn't quite work as it appends like this: filename.jpg2014-01-06 12:01:05How can I do this so that it will be filename2014-01-06 12:01:05.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Don't use the dot!
Don't use the dot!
Instead use the underscore. If you want to find out why I recommend against using the dot, try using the dot. It takes too long to explain, and it will make a mess of your application. But in life, "understanding" is the bobby prize!
Thanks for using EE, and thanks for the points, ~Ray
Don't use the dot!
Instead use the underscore. If you want to find out why I recommend against using the dot, try using the dot. It takes too long to explain, and it will make a mess of your application. But in life, "understanding" is the bobby prize!
Thanks for using EE, and thanks for the points, ~Ray
ASKER
Ah gotcha, will stick with underscore then. Thanks!
ASKER