Hi can anyone help me with this. Basically I used the file uploading class of codeigniter the link is
here
and it works fine! but I need to know how to create directory inside this default upload path $config['upload_path'] = './uploads/'
the name of the folder is the date today this is my sample code.
date_default_timezone_set('Asia/Manila');
$date = date('Y-m-d H:i:s');
$config['upload_path'] = './uploads/'.$date;
$config['allowed_types'] = 'jpg|jpeg|gif|png';
$config['max_size'] = '100';
$config['max_width'] = '1024';
$config['max_height'] = '768';
if (!is_dir('uploads/'.$date)) {
mkdir('./uploads/' . $date, 0777, TRUE);
}
and I got an error like
Message: mkdir(): Invalid argument
I search how it will be fix and they say this 0777
CI permission will do, but still it won't work for me.
Thanks for any response.
date('Y-m-d H.i.s')
instead of ':'. – Rescue