today the friend's website again problem (because just moved to new space various problems), so looked up a problem, found PHP data decode
After changed to NULL, this is very strange ah, so I measured in the local, no problem, then I went online to check, said decode request format is very strict
A little inaccurate will not work, so I put the data with Var_dump, found escaped, but no problem.
1. And then I did the first kind of test.
I put this data (var_dump printed data, copied out) directly decode, the result is possible. (Local can be outside the network can also)
2. Direct access to data decode
The result is displayed as null
I wonder why it is ....
Every time the PHP version upgrade, I rarely care about what has changed, at most the next latest version, this is really a bad habit,
Haha, not now, I win PHP is 5.3,mac is 5.6, the external network server is 5.2, a total of 3 versions
So I thought about whether it would be a PHP version problem (because local can)
Surf the Internet. Sure enough, there is a MAGIC_QUOTES_GPC option in the php.ini, open phpinfo () to find that he is on
This option escapes the user input, and the version is removed after php5.4, and the following steps are modified
1. Open php.ini
2. Find out where MAGIC_QUOTES_GPC is located
3. Change No to OFF
4. Restart the server
Everything OK.
The above describes the PHP automatic escape problem, the configuration of MAGIC_QUOTES_GPC legacy issues, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.