Source: bo-blog
1. magic_quotes_gpc = on:
=> \
=>
"=>"
2. When "inserting a database, the characters remain and are" and ". Therefore, you do not need to read stripslashes again.
Exception: magic_quotes_runtime = on.
3. If the/e modifier is used in the pattern of preg_replace, the situation in which replacement is passed to the callback function is:
=>
=>
"=>"
4. Read from the database. When magic_quotes_runtime = off, it seems => null?
Conclusion: The problem of quotation marks and backslash is complex, and varies with different server settings.
Now my solution is
==&# 92;
Htmlspecialchars is used for quotation marks, and quote_style is set to ENT_QUOTES.
We hope that the issue of code pasting in SP1 can be solved.
Test:
<? Php
Error_reporting (E_ALL );
/* Add redirection to get stderr output with a standard error. */
$ Handle = popen (/path/to/spooge 2> & 1, r );
Echo "$ handle;". gettype ($ handle )."";
$ Read = fread ($ handle, 2096 );
Echo $ read;
Pclose ($ handle );
?>