有誰知道我可以使用如何使用 '' 在PHP
$utf8string = str_replace('\',"\",$utf8string);
在PHP? 因爲我不能\後使用「,其給我一個錯誤
,如果我寫
$utf8string = str_replace('\ ',"\",$utf8string);
它不是做我想做
和
$utf8string = str_replace("\","\",$utf8string);
不是工作太
等什麼我必須這樣做?
我想更新MySQL,但如果我的文字到底有\其無法正常工作,並給我一個錯誤
這樣的查詢
update phpfox_comment_text set text_parsed = 'nakheir\',text = '' where comment_id = 197597
有400.000查詢我想更新,但我必須\的Cuz替換\我總是得到這個錯誤
http://php.net/manual /en/language.types.string.php。我覺得有義務告訴你,你有一個很大的SQL注入漏洞,可能使用了不推薦使用的'mysql_'擴展,並且你應該使用PDO或MySQLi和參數化查詢。 – Ryan
感謝您的信息 –