In the PHP script to read Chinese or other language is garbled, first check that your file format is stored in UTF8 encoding format. If not please use ultraedit ... And so on some of the tools to convert UTF8 support conversion, it is best not to use MS Notepad directly saved as a conversion, I began to make such a mistake. If you are editing in Dreamweaver, follow: Edit---Preferences---New Document Set the language to UTF8 encoding.
About the session validation problem: Initially My Documents were written in GB2312, and then a website needs to use UTF-8 encoding, I put some of my files in Ms Notepad opened, save as UTF-8 encoded, I didn't think he would add a signature (BOM) to the file header of the script, so I just converted the result is wrong: Cannot send session cookie-headers already sent by ...
Depressed debugging for a long time to find out three ways to solve:
The first kind is as mentioned earlier, the source of the file with Dreamweaver or UltraEdit ... And so on some of the UTF8 support conversion tools, this is the most fundamental solution;
The second is to add an "@" to the front of the session_start () function.
The third is to open phpinfo (), to see if output_buffering this parameter is no value, is the word set to 1
The above describes the sessions PHP garbled and sessions verification problem solving Method! , including the content of the sessions, I hope to be interested in PHP tutorial friends helpful.