在寫網站程式的過程中常常會遇到需要開放用戶上傳圖片的功能,
然而為了安全因素,需要將這個特定目錄不開放執行PHP檔。
只需在該目錄下的.htaccesss中寫入:
RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo
php_flag engine off
這樣就可以將該目錄設定為不能夠執行PHP檔,
在寫網站程式的過程中常常會遇到需要開放用戶上傳圖片的功能,
然而為了安全因素,需要將這個特定目錄不開放執行PHP檔。
只需在該目錄下的.htaccesss中寫入:
RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo
php_flag engine off
這樣就可以將該目錄設定為不能夠執行PHP檔,
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.