http://hi.baidu.com/freemandomrerr/item/70c9920cac5484f3a11034d0
這裡是依照上面網站做php 5.3 & 5.4調整
1. 控制php 訪問目錄 open_basedir = D:/apache目錄/wwww/ 也可以設定.htaccess
2. 關閉php版本訊息 ;expose_php = On → expose_php = Off
3. php 5.3以前打開 magic_quotes_gpc防止sql注入 PHP 5.3 版之後,PHP 從預設 magic_quotes_gpc = on,變成預設 magic_quotes_gpc = off,宣告拿掉 了這個功能。
->歷史參考:http://ithelp.ithome.com.tw/question/10113856?tag=rss.qu
4. 關閉錯誤提示 php 5.4 : display_errors = On → display_errors = Off
5.紀錄錯誤訊息 log_error = on
6. 防止JS 注入
Ex :
$title="<script>alert('111');</script>"; $title = htmlspecialchars($title,ENT_QUOTES);echo $title;
->參考 :http://www.w3school.com.cn/php/func_string_htmlspecialchars.asp
------------------------------------------------------------------------------------筆記ing.....................
沒有留言:
張貼留言