prestashop - php make directory with write permission not working -
in php want make directory write permission(0777). php code looks this
public function getcontent() { global $cookie; $uploaddir = (dirname(__file__).'/storename'); $tmpname = $uploaddir.'/'; if(file_exists($uploaddir)){ echo 'file exists'; } else { mkdir($uploaddir,0777); } } but here getting error warning: mkdir(): permission denied on line 10 . . can kindly tell me why error coming out here? using lamp server.
you use is_writable() function check before if parent directory writable
Comments
Post a Comment