special concept. ',
'uid' => 1,
'nickname' => 'Potato Man',
'site' => ",
'sitetype' => 1,
'starttime' => 1191074174,
'lasttime' => 1191629784,
'totleviews' => 14,
'totleblogs' => 3
);
Since the program automatically determines magic_quotes_gpc and automatically escapes all POST and GET data (under addslashes), $message['sitename'] in the above array becomes a native'tribe before being stored in the database. When entering the save of the mysql database, the saved content is still the "Turen' tribe" (don't ask me "How to enter the mysql database and it becomes". This is the escaping feature of mysql, and most databases also rely on to escape), there is no problem at this time.
The problem arises when this field is retrieved from the database and then unserialized. Since the value of the native tribe is not escaped from the database, it will fail during unserialize.
I thought of several solutions:
First, the array no longer exists in one field, and each key exists independently in a field. This is excluded because the system is already running and it is troublesome to change it.
Second, addslashes the serialized array before storing the data in mysql. At this time, the data stored in mysql is the Turen' tribe, but the database finds that the data after unserialization is still the Turen' tribe, so it needs to be processed again. This array stripslashes one by one.
Third, give up on user experience :). Do not allow '/' to appear. If it does, it will be automatically replaced.