There is such code:

$unzippedDirectory = '/' . date('H:i:s'); if (!is_dir($unzippedDirectory)) { mkdir($unzippedDirectory); chmod($unzippedDirectory,0775); } 

He must create a folder. All folders above have 0775 permissions.
When you call mkdir (), it does not give any error, but the folder is not actually created.
At the beginning of the script there is a directive:

  • In my opinion, you cannot create folders with a colon in their names. - Andrey Arshinov

3 answers 3

Please note that the directory is created in the root / probably you do not have permissions to create in the root directory of the system or the directory allowed in the virtual host web server.

Most likely the web server sees the root of the system, but it does not have rights. + check date.timezone in php.ini

  • about the colon is not quite so. you can create such directories :) - Oleksandr Loushkin
  • By default, php does not have rights to write to the root (and in no case is it necessary). About forbidden characters read here: (you must also take into account the features of the file system) - istem
  • the folder is not in the root, the address is: "../../import/history/2013/03/05/15:44:00" - Oleg Zagorodniy
  • according to your code, it is checked and created at the root ... you have at the beginning of the name a '/' which indicates the root of the system. - thunder

sure that the user under which it is running has rights to this folder? and further

Note: When the safe mode option is enabled, PHP checks whether the directory with which you are going to work has the same UID (owner) as the script that is being executed.

Well, at the expense of the colon correct remark.

  • safe mode option disabled - Oleg Zagorodni

If you need to create a directory relative to the current directory - then you need to do it like this

 $unzippedDirectory = './' . date('H:i:s');