Home  >  Article  >  php教程  >  PHP addcslashes() 函数

PHP addcslashes() 函数

WBOY
WBOYOriginal
2016-06-13 10:43:05967browse

定义和用法
addcslashes() 函数在指定的字符前添加反斜杠。

语法addcslashes(string,characters)
 
 
string 必需。规定要检查的字符串。
characters 可选。规定受 addcslashes() 影响的字符或字符范围。
提示和注释
注释:在对 0,r,n 和 t 应用 addcslashes() 时要小心。在 PHP 中,,, 和 是预定义的转义序列。

例子

$val = addcslashes($val, \);

?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn