Re: [請益] PHP有自動轉換跳脫字元的function嗎

看板PHP作者 (真的要變大叔了..)時間15年前 (2010/05/04 17:31), 編輯推噓2(203)
留言5則, 4人參與, 最新討論串2/2 (看更多)
※ 引述《chan15 (ChaN)》之銘言: : → chan15:他並沒有把\變成/ 05/03 20:27 你確定?... from http://tw2.php.net/manual/en/function.addslashes.php Returns a string with backslashes before characters that need to be quoted in database queries etc. These characters are single quote ('), double quote ("), backslash (\) and NUL (the NULL byte). -- 我是上來領便當的... 逛 php 版, database 版只是順便而已... http://blog.darkhero.net 個人網誌 http://phorum.study-area.org/index.php/board,31.0.html -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.62.60

05/04 19:46, , 1F
真的沒有啊, 是把\變成\\
05/04 19:46, 1F

05/04 19:47, , 2F
/不需要 escape
05/04 19:47, 2F

05/04 23:04, , 3F
\ 為什麼要變成 /?那 / 要變成什麼?
05/04 23:04, 3F

05/05 02:12, , 4F
找不到就自己寫一個.. 不難吧?
05/05 02:12, 4F

05/05 02:31, , 5F
應該是惡作劇用的吧,把所有的 / 和 \ 互換。
05/05 02:31, 5F
文章代碼(AID): #1Bt-c6V- (PHP)
文章代碼(AID): #1Bt-c6V- (PHP)