开发者

PHP does not issue a warning for undefined variables

开发者 https://www.devze.com 2023-03-13 10:14 出处:网络
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 i

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

精彩评论

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

关注公众号