摘要
PHP已经成为Web开发的主流语言,许多高校Web开发课程采用AMP(Apache+My SQL+PHP)作为开发环境,学生在编程过程中容易被乱码问题困扰,结合PHP实际教学经验,介绍字符解码编码原理、Web运行过程及HTTP响应报文格式,从HTTP请求响应数据流角度,深入分析Web服务器和数据库服务器可能导致乱码的原因,并提出解决办法。
PHP has become an important programming language of Web development, AMP(Apache+My SQL+PHP) server as a development environment in Web programming course of many universities. Students can easily in the process of garbled problem during programming, based on the actual teaching experience of PHP, introduces the principle of character encoding and decoding, the work process of Web program and HTTP response message, analyzes the reasons that the Web server and the database server may cause mojibake underlying the data flow of HTTP request/respond, and puts forward the solution to it.
作者
熊志斌
田兴彦
XIONG Zhi-bin;TIAN Xing-yan(Hainan Tropic Sea University Collage of Art and Creativity,Hainan 57202)
出处
《现代计算机》
2018年第11期57-61,共5页
Modern Computer
基金
海南热带海洋学院教改项目(No.RDJGb2017-40)
海南省自然科学基金项目资助(No.20166225)
海南省重点研发项目资助(No.ZDYF2016166)
关键词
字符集
字符编码
乱码
PHP
Character Set
Character Encoding
Mojibake
PHP