Re: [請益] php 發生 隱碼問題
: 或是乾脆檔案前面加 ini_set ('magic_quotes_gpc','0'); 算了
這是沒用的
http://www.php.net/manual/en/function.get-magic-quotes-gpc.php
Keep in mind that the setting magic_quotes_gpc will not work at runtime
: 我的php.ini沒改過這個 預設也是off
建議是在連資料庫的函式中對所有 $_GET $_POST $_COOKIE 做處理
如果magic_quotes_gpc是0 那就對所有$_GET $_POST $_COOKIE進行 addslashes
如果magic_quotes_gpc是1 那還是有問題
因為magic_quotes_gpc假設你的字元全是ascii 這個可以參照下面這個網頁
http://chensh.loxa.edu.tw/php/X_1.php
如果大家有比較好的mbstring解決方法也請告知一下 ^^ 感激不盡!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.143.227.65
推
04/15 11:45, , 1F
04/15 11:45, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 9 之 10 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章