PHP China | 中国开源之路 's Archiver

suntiger035 发表于 2008-11-19 18:15

故意把程序改错了,浏览器还是不报错?

故意把程序改错了,浏览器还是不报错?
具体的是这样的:APACHE已经安装了,并且出现了“it works”那个页面了,说明APACHE安装没问题,然后安装PHP5,我是从网上下载的那种,MSC格式的,直接安装,然后把配置了下环境,并且PHP.INI里面的display_errors已经改成on了,然后寻星这个程序是

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<?php echo "hello,php"; ?>

</body>
</html>

,能显示,现在我想测试下浏览器的报错功能,故意把代码改成

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<?php1 echo "hello,php"; ?>

</body>
</html>

,按道理说,浏览器应该报错的,但是他却显示是空白,IE6.7.FF都是这样,请问这是为什么?谢谢

[[i] 本帖最后由 suntiger035 于 2008-11-19 18:18 编辑 [/i]]

Fising 发表于 2008-11-19 18:28

[attach]27547[/attach]

我的世界之窗浏览器报错了。

PS:这个和浏览器没有关系。

suntiger035 发表于 2008-11-19 18:40

对,我就是想问是我哪一部分的配置错问题了呢

syb328 发表于 2008-11-19 18:48

你更改后重启apache了吗 php.ini  display_errors = On 重启apache才能生效

suntiger035 发表于 2008-11-19 19:06

[quote]原帖由 [i]syb328[/i] 于 2008-11-19 18:48 发表 [url=http://www.phpchina.com/bbs/redirect.php?goto=findpost&pid=733463&ptid=92021][img]http://www.phpchina.com/bbs/images/common/back.gif[/img][/url]
你更改后重启apache了吗 php.ini  display_errors = On 重启apache才能生效 [/quote]
我确定改了,也确定重启了,可还是不行啊

17too 发表于 2008-11-19 19:07

这种东西跟浏览器是没有什么关系的

suntiger035 发表于 2008-11-19 19:17

[quote]原帖由 [i]17too[/i] 于 2008-11-19 19:07 发表 [url=http://www.phpchina.com/bbs/redirect.php?goto=findpost&pid=733480&ptid=92021][img]http://www.phpchina.com/bbs/images/common/back.gif[/img][/url]
这种东西跟浏览器是没有什么关系的 [/quote]
你觉得是我哪出问题了呢

akas628 发表于 2008-11-19 19:17

自己还是查看下环境配置吧

suntiger035 发表于 2008-11-19 19:21

[quote]原帖由 [i]akas628[/i] 于 2008-11-19 19:17 发表 [url=http://www.phpchina.com/bbs/redirect.php?goto=findpost&pid=733492&ptid=92021][img]http://www.phpchina.com/bbs/images/common/back.gif[/img][/url]
自己还是查看下环境配置吧 [/quote]
我开始想也是这样,我把所有的全卸载之后,按照[url]http://bbs.phpchina.com/viewthread.php?tid=44557[/url]这个页面的做了,结果还是一样的

某个人 发表于 2008-11-19 19:24

关键是
;error_reporting  =  E_ALL前面的;要注释掉。

suntiger035 发表于 2008-11-19 19:30

[quote]原帖由 [i]某个人[/i] 于 2008-11-19 19:24 发表 [url=http://www.phpchina.com/bbs/redirect.php?goto=findpost&pid=733505&ptid=92021][img]http://www.phpchina.com/bbs/images/common/back.gif[/img][/url]
关键是
;error_reporting  =  E_ALL前面的;要注释掉。 [/quote]我已经把分号去掉了,还是不行

yafeikf 发表于 2008-11-19 19:44

[php]
<?php
error_reporting(E_ALL);

echo 'd;
[/php]
这样呢?

liexusong 发表于 2008-11-19 19:48

试试这个吧
[php]
clearstatcache();
[/php]

suntiger035 发表于 2008-11-19 20:00

兄弟们,我不行了,先回家休息会,明天继续,谢谢你们

shanbangyou 发表于 2008-11-19 23:39

弱语法

linvo 发表于 2008-11-20 00:03

改个更离谱的错误试试

1nject10n 发表于 2008-11-20 00:33

你首先要确定的是你所改的php.ini是不是目前php所加载的。很多人都容易犯这个毛病。

phpinfo第七行:
看看Loaded Configuration File后面的路径,这个才是php所加载的php.ini,如果这行是空的,看第六行

suntiger035 发表于 2008-11-20 08:42

不把这个问题搞定了,我就没法混了

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.