当前位置:网站首页>PHP mkdir(): permission denied uploading a file will change the folder permission to 411 permission

PHP mkdir(): permission denied uploading a file will change the folder permission to 411 permission

2022-06-11 23:13:00 Small cap I

The reason is that there is something wrong with the permission you give ; for example :

chmod('public/uploads','0777');
chmod('public/uploads',777);
mkdir('public/uploads','0777');

This is wrong , Or there is no problem testing locally , An error is reported when uploading to the server :

mkdir(): Permission denied

resolvent :

You need to remove the quotation marks , Or complete the permission parameters

chmod('public/uploads',0777);
mkdir('public/uploads',0777);

777 perhaps '0777' It's actually octal 01411

So it leads to an error :mkdir(): Permission denied

原网站

版权声明
本文为[Small cap I]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206112310544403.html