看板 PHP 關於我們 聯絡資訊
※ 引述《JYHuang (夏天到了,冷不起來了說)》之銘言: : ※ 引述《reflynet ()》之銘言: : : 首先可能要先說明一下,我有個購物車是用ecshop的. ^^^^^^^^^^^^^^^^ (1) : 不知道您的購物車是用何種程式呢? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 這個問題的答案在 (1) ... 這種問題可以用 htmlspecialchars() 解決.. 現在的網頁程式都會把資料丟進資料庫,請視情況,善用這些 PHP 函數: * addcslashes() http://www.php.net/addcslashes * addslashes() http://www.php.net/addslashes * htmlspecialchars() http://www.php.net/htmlspecialchars 當然,要用 RE 硬幹我也不反對~ XD -- ▄▆▇▍ ▆ ▇ ▏▎▍▌▋▊▉ φkaishin ┼── █▏── ▁▁▍▁ ─────── JoeHorn┬┼ ▄ꈠ ▂▄▎ ▄ ▎▄▅ └┼ ┼┐ ◢▂ ▄▆ ┼┴ -▂▄-──-─┼ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.173.170.153
reflynet:我都用strip_tag啦... ecshop是沒想到他沒有防到這個 06/07 00:26
ybite:再加一個mysql_real_escape_string 06/07 00:32
reflynet:RE硬幹是這樣嗎? preg_replace("#<script#is","<|scr", $ 06/07 00:44