Hướng dẫn php escape quotes
(PHP 4, PHP 5, PHP 7, PHP 8) addslashes — Quote string with slashes Descriptionaddslashes(string
A use case of addslashes() is escaping the aforementioned characters in a string that is to be evaluated by PHP:
The addslashes() is sometimes incorrectly used to try to prevent SQL Injection. Instead, database-specific escaping functions and/or prepared statements should be used. Parametersstring The string to be escaped. Return ValuesReturns the escaped string. ExamplesExample #1 An addslashes() example
See Also
roysimke at microsoftsfirstmailprovider dot com ¶ 12 years ago
hoskerr at nukote dot com ¶ 19 years ago
svenr at selfhtml dot org ¶ 11 years ago
= "He said \"Hello O'Reilly\" & disappeared.\nNext line..."; geekcom ¶ 3 years ago
hybrid at n0spam dot pearlmagik dot com ¶ 21 years ago
unsafed ¶ 17 years ago
divinity76 at gmail dot com ¶ 6 months ago
David Spector ¶ 8 years ago
stuart at horuskol dot co dot uk ¶ 13 years ago
Nate from RuggFamily.com ¶ 15 years ago
Adrian C ¶ 15 years ago
Picky ¶ 16 years ago
php at slamb dot org ¶ 19 years ago
luciano at vittoretti dot com dot br ¶ 16 years ago
Lars ¶ 10 years ago
joechrz at gmail dot com ¶ 16 years ago
array_keys($thearray) as $string) { DarkHunterj ¶ 13 years ago
baburaj dot ambalam at gmail dot com ¶ 2 years ago
= "5 + 3"; |