Jump to content

mindspins

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mindspins's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Well... you've got me doubting here... I might just need to check your solution after I get some sleep... I'll let you know after a good night rest!
  2. I know what you're trying to achieve, but the user is the owner of the folders in use and is triggering the php. That's why I don't understand it?!
  3. I'm using the following code in a WordPress functions file to rename a folder in the uploads folder according to the date, but this only works if the chmodd settings of both folders are 777. How can I change this code so I can use at least chmodd 755 to keep my website save. date_default_timezone_set('Europe/Amsterdam'); // set timezone $foldername = ''; $source = 'uploads'; $allfolders = getDirectory($source); // get folders $folder = $source.'/'.$allfolders[0]; // get first folder $month = (int)date('n'); $day = (int)date('j'); $f = 50-$day; $s = 100-$month; $newfolder = $source.'/'.(string)$f.(string)$s; if($folder != '' && $folder != $newfolder){ rename($folder, $newfolder); $foldername = $newfolder."/"; }else if($folder == $newfolder){ $foldername = $newfolder."/"; } else{ $foldername = 'error'; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.