php网页在火狐浏览器下直接输出html代码问题 你 是不是对浏览器进行了判断,如果判断出浏览器是FF的话,就echo 个"<plaintext>" 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 试试把这两行<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">直接改成<html> http://thomas0988.javaeye.com/blog/263347看下你的PHP程序里的header是不是对的 直接改成<html>他代码里的div+css可能就会出来问题了 回复bookmoth: 要加的语句,我之前就有,不是这个问题恢复phpBoy005:我的PHP header是这么写的session_start();header("Cache-Control: no-cache"); header("charset=utf-8");header("Content-type:text/html"); 1 为什么firefox会直接显示源码http://wiki.sociz.com/@%E4%B8%BA%E4%BB%80%E4%B9%88%E7%94%A8Firefox%E4%B8%8D%E8%83%BD%E6%AD%A3%E5%B8%B8%E6%B5%8F%E8%A7%88%E6%9F%90%E4%BA%9B%E7%BD%91%E9%A1%B5%EF%BC%9F2 w3c测试地址http://validator.w3.org/check?uri=http%3A%2F%2Fwww.eyenet.com.cn%2F&charset=(detect+automatically)&doctype=Inline&ss=1&outline=1&group=0&No200=1&verbose=1&st=1&user-agent=W3C_Validator%2F1.654 后两行应该是header("Content-Type: text/html; charset=utf-8");而且你的header也不对,Content-Type说是gif,贴上给你参考http://www.eyenet.com.cn/columns/index/GET /columns/index/ HTTP/1.1Host: www.eyenet.com.cnUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: zh-cn,zh-tw;q=0.8,zh;q=0.7,en-us;q=0.5,en;q=0.3,ja;q=0.2Accept-Encoding: gzip,deflateAccept-Charset: gb2312,utf-8;q=0.7,*;q=0.7Keep-Alive: 300Connection: keep-aliveReferer: http://www.eyenet.com.cn/HTTP/1.1 200 OKDate: Mon, 13 Apr 2009 03:42:22 GMTServer: Apache/2.2.8 (Win32) PHP/5.2.6X-Powered-By: PHP/5.2.6Set-Cookie: PHPSESSID=fs5llunco5jmcf34afia4mrkb7; path=/Set-Cookie: SAFETY_COOKIE=safety1239594142; expires=Mon, 13-Apr-2009 04:42:22 GMTExpires: Thu, 19 Nov 1981 08:52:00 GMTCache-Control: no-cachePragma: no-cacheKeep-Alive: timeout=5, max=97Connection: Keep-AliveTransfer-Encoding: chunkedContent-Type: gif 恩,谢谢你,我找到问题了,我在程序中引入了别人写的一个图片处理类,里面有个header("Content-type:$img_type");这个语句,注释掉就好了,在此谢谢大家的帮助,谢谢啦~ 请教PHP全局变量问题? ftp服务器哪一种比较好? 关于Linux系统与Windows系统下使用php程序中的字符转义问题 关于iconv函数的一个问题 请问下面的问题怎么解决? 请教session_start();session_destroy()可以在每个页面上都用吗? 菜鸟开始学习PHP,请大家指点一二吧:) 送分问题:如何通过php从mysql中得到数据? 关于模板存放位置的讨论问题。说得好的都有分。(共60分) 一个关于查找的bug!(请高手帮忙) 不知道是网页问题还是程序问题 class or function
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
直接改成
<html>
看下你的PHP程序里的header是不是对的
他代码里的div+css可能就会出来问题了
恢复phpBoy005:我的PHP header是这么写的
session_start();
header("Cache-Control: no-cache");
header("charset=utf-8");
header("Content-type:text/html");
http://wiki.sociz.com/@%E4%B8%BA%E4%BB%80%E4%B9%88%E7%94%A8Firefox%E4%B8%8D%E8%83%BD%E6%AD%A3%E5%B8%B8%E6%B5%8F%E8%A7%88%E6%9F%90%E4%BA%9B%E7%BD%91%E9%A1%B5%EF%BC%9F2 w3c测试地址
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.eyenet.com.cn%2F&charset=(detect+automatically)&doctype=Inline&ss=1&outline=1&group=0&No200=1&verbose=1&st=1&user-agent=W3C_Validator%2F1.654
header("Content-Type: text/html; charset=utf-8");
而且你的header也不对,Content-Type说是gif,贴上给你参考
http://www.eyenet.com.cn/columns/index/GET /columns/index/ HTTP/1.1
Host: www.eyenet.com.cn
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh-tw;q=0.8,zh;q=0.7,en-us;q=0.5,en;q=0.3,ja;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: gb2312,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.eyenet.com.cn/HTTP/1.1 200 OK
Date: Mon, 13 Apr 2009 03:42:22 GMT
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Set-Cookie: PHPSESSID=fs5llunco5jmcf34afia4mrkb7; path=/
Set-Cookie: SAFETY_COOKIE=safety1239594142; expires=Mon, 13-Apr-2009 04:42:22 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Keep-Alive: timeout=5, max=97
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: gif