How to setting permission when upload image in IIS windows.

How to setting permission when upload image in IIS windows.

The problem only happens when you use PHP to upload a file. When you upload a file, PHP sends the file to a temporary directory on the hard drive (for me it is C:\Windows\Temp) and then copies it over to it’s intended directory. Once the file has landed in the temporary directory, it is assigned the permissions of that directory. The problem is when Windows copies that file, it keeps the temporary directory’s permissions and doesn’t inherit your web directory’s permissions.

The easiest way to fix this problem is to add to the temporary directory your intended web directory’s permissions. There’s no need to erase the permissions already in the temporary directory, just add the web directory’s permissions to them. In other words, follow these steps

1. To change the permissions of your temporary upload directory, find the “upload_tmp_dir” in your php.ini file.
2. Set it to the directory of your choosing (outside your web folders of course) or leave it at default (for me it is C:\Windows\Temp).
3. Browse to this folder and add the permissions of your web folders to it.

Thank you. Brian Leishman

Central oF Thai Home : KAIIBAAN.COM

ความคิดเห็น

บทความที่ได้รับความนิยม