Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2006
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    create a new directory dynamically for image upload every month

    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

  • #2
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    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.
    Leonard Whistler

  • #3
    Regular Coder devinemke's Avatar
    Join Date
    Dec 2004
    Location
    NYC
    Posts
    443
    Thanks
    0
    Thanked 12 Times in 11 Posts
    PHP Code:
    $upload_dir date('Y-m');
    if (!
    file_exists($upload_dir)) {mkdir($upload_dir);} 
    ...then feed $upload_dir to the rest of your code

  • #4
    Regular Coder
    Join Date
    Aug 2006
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi devinemke,

    thanks for your idea.it works excellent.


    thanks
    mrjameer


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •