开发者

PHP does not issue a warning for undefined variables

Please correct me if I am wrong. From what I gather, PHP should issue a warning for th开发者_如何学JAVAis but doesn't. I am using PHP 5.2.17. How can I fix this? I am assuming this is set somewhere in php.ini?


Check the docs for error reporting. I believe if you enable E_NOTICE you'll see warnings for undefined variables. You can read up on all the error reporting constants here.


Probably error reporting is off.

error_reporting(-1);

Or, you are using a variable in a way that it does not have to be declared.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜