奇怪的PHP空白页问题-- 大概是编码问题,你加个<meta http-equiv="Content-Type" content="text/html; charset=gbk">试试? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我用的是UTF8的编码。这个有影响么? 是这样子的。你的php应该是保存的utf-8的格式。这种格式会有一个特殊的控制字符在每个文件的最前面。你改改编码就可能会看到出错信息了。前几天我刚好碰到过这种情况。 看一下是不是<style>或<script>两组标签没有成对闭合<!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" xml:lang="zh" lang="zh" dir="ltr"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="keywords" content="Leo,HEnT Studio,LAMP,PHP,MySQL" /> <meta name="DEscription" content="HEnT Studio" /> <meta name="Author" content="Leo,HEnT Studio" /> <link rel="shortcut icon" href="favicon.ico" /> <link rel="stylesheet" type="text/css" href="templates/css.css" /> <script type="text/javascript" src="js.js"><!-- 此处少了</script>页面空白 --> <title>分页类</title></head> <body> <div id="page"><em>321</em> <strong>1</strong> <a href="/LeoGB/index.php?o=9&pa=2">2</a> <a href="/LeoGB/index.php?o=9&pa=3">3</a> <a href="/LeoGB/index.php?o=9&pa=4">4</a> <a href="/LeoGB/index.php?o=9&pa=5">5</a> <a href="/LeoGB/index.php?o=9&pa=6">6</a> <a href="/LeoGB/index.php?o=9&pa=7">7</a> <a href="/LeoGB/index.php?o=9&pa=8">8</a> <a href="/LeoGB/index.php?o=9&pa=17">...17</a> <kbd><input type="text" size="3" onkeydown="if(event.keyCode==13) {window.location='/LeoGB/index.php?o=9&pa='+this.value; return false;}" /></kbd></div> <div id="limit">LIMIT 0 , 20</div> <div id="prctime">Prc 12.80 ms</div> </body></html> UTF8文件最前面有不可用文本编辑器编辑的三字节BOM,但页面还是有输出的,只在header,setcooke,session_start等时会产生错误和警告 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /server/httpd/htdocs/uplooking.com/detail.php on line 30错误还是比较多 现把所有u8编码的文件用convertz转换下,不要bom。然后看下sql连接信息,也许填错了? 结贴,解决了。wildlily980 小李说的问题。谢谢了。 请教如何创建一个二维数组? 网站加QQ功能 为了确保安全,PHP需要对提交的数据做哪些过滤? 新工具来了,呵呵 急!!!oracle字符集问题 求助,关于APC扩展的配置参数 500错误如何解决 在线等,帮帮忙吧,高手们!!php与Mysql的问题 非常简单的一个排序问题 php做验证码输出图片显示的是乱码,怎么破? 被挂马,有没什么好办法? Apache2.2.8+PHP5.2.6 启动时提示Unable to load dynamic library
<!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" xml:lang="zh" lang="zh" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Leo,HEnT Studio,LAMP,PHP,MySQL" />
<meta name="DEscription" content="HEnT Studio" />
<meta name="Author" content="Leo,HEnT Studio" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="templates/css.css" />
<script type="text/javascript" src="js.js"><!-- 此处少了</script>页面空白 -->
<title>分页类</title>
</head>
<body>
<div id="page"><em>321</em> <strong>1</strong> <a href="/LeoGB/index.php?o=9&pa=2">2</a> <a href="/LeoGB/index.php?o=9&pa=3">3</a> <a href="/LeoGB/index.php?o=9&pa=4">4</a> <a href="/LeoGB/index.php?o=9&pa=5">5</a> <a href="/LeoGB/index.php?o=9&pa=6">6</a> <a href="/LeoGB/index.php?o=9&pa=7">7</a> <a href="/LeoGB/index.php?o=9&pa=8">8</a> <a href="/LeoGB/index.php?o=9&pa=17">...17</a> <kbd><input type="text" size="3" onkeydown="if(event.keyCode==13) {window.location='/LeoGB/index.php?o=9&pa='+this.value; return false;}" /></kbd></div>
<div id="limit">LIMIT 0 , 20</div>
<div id="prctime">Prc 12.80 ms</div>
</body>
</html>
然后看下sql连接信息,也许填错了?
wildlily980 小李说的问题。谢谢了。