一般服务器为了安全都会再php.ini配置中关闭报错功能。(display_errors=Off)
显示页面报错:(注意:加在网页最上面)
- <?php
- if(!ini_get('display_errors')){
- ini_set('display_errors','On');
- }
- error_reporting(E_ALL);
-
error_reporting(E_ALL & ~E_NOTICE); //除notice注意之外的
- include("dfasfasdds.php");
- sdfasdfsd
- ?>
本文转自许琴 51CTO博客,原文链接:http://blog.51cto.com/xuqin/962843,如需转载请自行联系原作者