Modifying the encoding in the server in PHP development
1 Apache open Web page garbled, the method of modifying the Apache default character set is as follows:
Open Apache profile httpd.conf,windows under Apache configuration file path is generally D:\Program Files\apache software foundation\apache2.2\conf (default path installation)
Find adddefaultcharset utf-8, change it into adddefaultcharset GBK;
Then restart the Apache service.
2 PHP Development Sometimes cross-class calls, the preferred request "xxx.php";
header ("Content-type:text/html;charset=utf-8"); Set someone's character set require "user.php"; You must apply a class to use //Request a request for a class $db =new User (); Instantiate object $db->testone (); Methods for calling Objects
The above describes the PHP development to modify the code in the server, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.