使用python,在网页上显示内容,前面需要加载sys模块,设定他的编码
即实现这样的操作。
#!/usr/bin/python
import sys
reload(sys)
sys.setdefaultencoding('GBK')
print 'Content-Type: text/html;charset=GBK \r\n' //指明返回文件信息
print 'yuan hui is a pig'
python换行是print或者\n
使用python,在网页上显示内容,前面需要加载sys模块,设定他的编码
即实现这样的操作。
#!/usr/bin/python
import sys
reload(sys)
sys.setdefaultencoding('GBK')
print 'Content-Type: text/html;charset=GBK \r\n' //指明返回文件信息
print 'yuan hui is a pig'
python换行是print或者\n