"; $zongzi = stripslashes($zongzi); echo $zongzi; ?> PHP quotemeta() function definition and usage quotem"/> "; $zongzi = stripslashes($zongzi); echo $zongzi; ?> PHP quotemeta() function definition and usage quotem">
Home >Backend Development >PHP Tutorial >Special symbol network name PHP implementation code for adding slash before special characters
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.