PHP upload files under Linux considerations,
The example of this article for everyone to share the Linux php upload file notes, for your reference, the specific content as follows
1, modify the Upload directory permissions
Linux modifies all subdirectories permissions under a directory
Chmod-r 777 HTML
Modify a directory for any user with write read Execute permission
chmod a+rwx HTML
2. Set the root directory of the uploaded files
Get the project root directory
$siteRoot = DirName (__file__);
3, modify the configuration file upload size php.ini
Post_max_size = 200M
Upload_max_filesize = 200M
4, if you want to create a folder based on time and then upload files, you need the following
$AIMURL = Str_replace (', '/', $aimUrl), $aimDir = '; $arr = explode ('/', $AIMURL); foreach ($arr as $str) {$aimDir. = $str . '/'; if (!file_exists ($aimDir)) {mkdir ($aimDir); chmod ($aimDir, 0777);}}
The above is the whole content of this article, I hope that you learn PHP programming help.
http://www.bkjia.com/PHPjc/1135009.html www.bkjia.com true http://www.bkjia.com/PHPjc/1135009.html techarticle Linux under the PHP upload file considerations, this example for everyone to share the Linux php upload file notes, for your reference, specific content as follows 1, modify the upload directory permissions Linux repair ...