Loading...

修改php設定

Temperature: 0 °C

Mark ChangMark Chang
author_tools


修改php設定
進入系統

用文字編輯軟體打開php.ini改變以下設定

disable_functions = system,passthru,exec,shell_exec,popen,phpinfo
關閉一些跟系統有關的函數

register_globals = Off
關閉自動註冊成全域變數

magic_quotes_gpc = On
可以防止SQL Injection

allow_url_fopen = Off
可以防止從http引用到不該引用的東西

display_errors = Off
千萬不要顯示錯誤訊息

log_errors = On
error_log = 你想放錯誤紀錄的檔案位置
會將伺服器的錯誤記錄在文字檔

open_basedir = C:\AppServ\www
設定你的起始資料夾,避免被存取網站以外的目錄

expose_php = Off
這行不讓伺服器流出版本資訊

https://innstory.com/story-修改php設定-1534
PHP

Prev
 PHP輸出到WORD跟EXCEL_簡易做法

Next
修改apache設定 

About the Author

Mark Chang

離不開電腦的宅男

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

使用CSS讓Youtube自動適應寬度跟高度

使用CSS讓Youtube自...

pexelsphotomedia 在播放Youtube影音的時候,常使用 iframe 的方式崁入網...

PHP如何設定HTTP安全標頭?

PHP如何設定HTTP安全標...

PHP該如何將以下安全標頭添加到網站? XFrameOptions  防止點擊劫持攻擊 XXSSPr...

Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 12288 bytes) in

Fatal error: A...

今天在客戶的網站系統上發現了一個問題。 在上傳檔案時發生了一個錯誤: Fatal error: Al...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format