(PHP 4, PHP 5)
quotemeta — Quote meta characters
說明
string quotemeta ( string$str
)
Returns a version of str with a backslash character () before every character that is among these: . + * ? [ ^ ] ( $ )
參數
str
The input string.
返回值
Returns the string with meta characters quoted, or FALSE
if an empty
string is given as str
.
注釋
Note: 此函數可安全用于二進制對象。
參見
addslashes() - 使用反斜線引用字符串 addcslashes() - 以 C 語言風格使用反斜線轉義字符串中的字符 htmlentities() - Convert all applicable characters to HTML entities htmlspecialchars() - Convert special characters to HTML entities nl2br() - 在字符串所有新行之前插入 HTML 換行標記 stripslashes() - 反引用一個引用字符串 stripcslashes() - 反引用一個使用 addcslashes 轉義的字符串 ereg() - 正則表達式匹配 preg_quote() - 轉義正則表達式字符