hello,
I want to create new folder every day and upload to it.
Example:
on 23-6-2009 a folder named 23-6-2009 will be create under userfiles:(so the result will be (userfiles/23-6-2009/).
I add the following to config.php
It works fine with windows but when I upload it to my server (centOS) it did not work. I have enabled and disbaled the safe mode and the result the same. (it only create the folder 23-9-2009 but can not put the uploaded files inside it)
thanks for help.
I want to create new folder every day and upload to it.
Example:
on 23-6-2009 a folder named 23-6-2009 will be create under userfiles:(so the result will be (userfiles/23-6-2009/).
I add the following to config.php
$Config['UserFilesPath'] = '/userfiles/'.date("Y-m-d").'/' ; $filename =$Config['UserFilesPath']; if (file_exists($filename)) { } else { mkdir( $filename, 0777); }
It works fine with windows but when I upload it to my server (centOS) it did not work. I have enabled and disbaled the safe mode and the result the same. (it only create the folder 23-9-2009 but can not put the uploaded files inside it)
thanks for help.
Re: creating upload folder every day?
You do not specify any errors that you get. The problem with creating a folder and not uploading files is usually a problem with the php.ini. Rry setting the 'upload_tmp_dir = /tmp' and 'session.save_path = /tmp' variables.
The rest of the code looks like it will work.