Avatar of Nathan Riley
Nathan Riley
Flag for United States of America 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:
move_uploaded_file($_FILES["file"]["tmp_name"],
        "uploads/".$orgid."/".$_FILES["file"]["name"].date("Y-m-d H:i:s"));

Open in new window

This doesn't quite work as it appends like this: filename.jpg2014-01-06 12:01:05

How can I do this so that it will be filename2014-01-06 12:01:05.jpg
PHPWeb DevelopmentApache Web Server

Avatar of undefined
Last Comment
Nathan Riley

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
gr8gonzo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Nathan Riley

ASKER
Ok thanks guys, I'll go with either the . or _.
Ray Paseur

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
Nathan Riley

ASKER
Ah gotcha, will stick with underscore then.  Thanks!
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23