...

View Full Version : create a new directory dynamically for image upload every month



mrjameer
03-15-2007, 06:38 PM
hi,


i have a image uoload site.till now all the images are uploaded in single directory and the path will be stored in mysql table.i want to dynamically create a new directory every month for image upload.once the month is finished then create a new directory dynamically and upload all the images in that new directory.
any of your idea will be appreciated.

thanks
mrjameer

Len Whistler
03-15-2007, 09:29 PM
Since it is only once a month how about creating a new folder yourself and changing the upload script to point to the new folder.

devinemke
03-15-2007, 09:49 PM
$upload_dir = date('Y-m');
if (!file_exists($upload_dir)) {mkdir($upload_dir);}

...then feed $upload_dir to the rest of your code

mrjameer
03-17-2007, 03:37 PM
hi devinemke,

thanks for your idea.it works excellent.


thanks
mrjameer



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum