Post

PHP - addslashes()

addslashes()



따옴표, 쌍따옴표, 백슬래쉬, NULL 문자에 대해 escape 해주는 함수


1
2
3
4
5
addslashes ( string $string ) : string

$str = "Is your name O'Reilly?";

echo addslashes($str) // Outputs: Is your name O\'Reilly?






This post is licensed under CC BY 4.0 by the author.