Create New Folder For Each Day an Upload Occurs

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  1. // Determine Upload Path
  2. $upload_path = $upload_root. date('m-d-y', time());
  4. // If Directory for Today's Uploads Does Not Exist Already, Let's Create It
  5. if(!is_dir($upload_path))
  6. {
  7. mkdir($upload_path, 0777, true);
  8. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.