Copy code The code is as follows:
$zongzi = "asdfasdf(asdfasdf?asfdadsf)";
echo $zongzi = quotemeta($zongzi);
echo "
";
$zongzi = stripslashes($zongzi);
echo $zongzi;
?>
Parameters | Description |
---|---|
string | Required. Specifies the string to check. |
Copy code The code is as follows:
$str = "Hello world. (can you hear me?)";
echo quotemeta($str);
?>
The above introduces the implementation code of PHP adding a slash before special characters in network names with special symbols, including the content of network names with special symbols. I hope it will be helpful to friends who are interested in PHP tutorials.