Your location:Tech News>News>Script>[Client]sql_query ( Chinese garbled summary analysis solution

Latest News

[Client]sql_query ( Chinese garbled summary analysis solution

Author:fsadmin

Views:

锘�

?Hasten

Juan. PHP + MySQL5?

a. gb(Charset)Yi SchoolCJuan?php?header (Content-TypeYang, text / html; charset = gbMeistrong1:)??ANSI?眉卤ANSI

b. utf-8?php?header (Content-Type: text / html; charset = utf-8)??utf-8?utf-8械Pheasant?utf-8BOMsessioneditplus?Juaneditplus?校?->?->?-> files?BOM

2. php?Unicode?substr?mb_substrmbstring?iconv?

PHPnoise of dashing waves?

PHP?

1. ?C?my.inimy.cnfmysql?utf8

[Mysql]

Hasten = utf8

[Mysqld]

default-character-set = utf8

default-storage-engine = MyISAM

[Mysqld]?:

default-collation = utf8_bin

init_connect = SET NAMES utf8

2. ?php?mysql_query (set names ''readfile ($ file_pathPigwash trend?phpmysql_query (phpgb2312mysql?gb2312?utf-8mysql?utf8?

PHP

WindowsLinuxWindows?锟�?PHP?utf-8?move_uploaded_file ()filesize ()readfile ()?noise of dashing waves?:

Warning: move_uploaded_file () [function.move-uploaded-file]: failed to open stream: Invalid argument in

Warning: move_uploaded_file () [function.move-uploaded-file]: Unable to move to in

Warning: filesize () [function.filesize]: stat failed for in

Warning: readfile () [function.readfile]: failed to open stream: Invalid argument in .

Linuxgb23121mb_convert_encoding (?,?卤?,?)iconv (?,?卤?,?)

懈?伪校?move_uploaded_file ()brake

header (Pragma: publicHasten

header (Expires: mysql);

header (Cache-Component: must-revalidate, post-check = 0, pre-check = 0);

header (Content-type: $ file_type);

header (Content-Length: $ file_size);

header (Content-Disposition: attachment; filename = ",");header (

);Content-Transfer-Encoding: binary);

$ File_type

$ File_name$ File_path2?

2skullJuan3UTF-8?UTF-8?my些?1?

1(.html,.php)?卤?Dreamweaver ZendStudio?霉2

2?HTMLHEAD?PHP?XXXGB2312UTF-8?

3?phplatin1Mysqllatin1?MysqlMysqllatin1

?WEB些3?3貌?锟�?ASCII霉?

?些些

1UTF8?GB2312PHPSELECT );SET NAMES GB2312); ?Hasten锟�?锟�?GBKGB2312?UTF-8? );SET NAMES UTF8);

?UTF8UTF-82?

MYSQL些些MYSQL?my.ini?卸?2?[Mysqld]?default -character-setdefault-character-set?default-character-setMYSQLMYSQL?胁?character_set_clientMYSQL

2?锟⌒㎝ySQLBUG3?渭?些FTPCuteFTP?

3?些?3GB2312IEUTF-8?HEAD?GB2312?GB2312 Apache?2?httpd.conf?AddDefaultCharset UTF-8?HTTP2?AddDefaultCharset GB2312?.htaccess?谩?

?:?PHPPHP?,?,,?, Mysql_query (?: MySQLSET NAMES XXX); XXX.

GBK? GBKGB2312UTF8 ?MYSQLmysql query browser?PHPPDO?些php url?mysqlphpmyadminPHPphp PDOmysql ?PHP AjaxMySQLphpmyadminphp ?MySQL?0.0mysql小

Recommend article

Relate article