未显示库中的错误 - Code Igniter / PHP
Code Igniter 中的库中的错误在某些服务器配置中不会显示。
如何手动覆盖该设置?
Errors in libraries in Code Igniter aren't displayed in some server configurations.
How can that setting be overridden manually?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在主索引页中添加
error_reporting(E_ALL);
。我建议您在准备好发布网站后将其删除。In the main index page add
error_reporting(E_ALL);
. I recommend you remove this once you are ready to publish the website.将主 index.php 文件中的环境更改为开发环境。
搜索行
define('ENVIRONMENT', 'development');
change environment in your main index.php file to development.
search for line
define('ENVIRONMENT', 'development');
只需在调用库之前或在库的开头添加此行
ini_set('display_errors', true);
到控制器中的某个位置,一切就应该可以正常工作。Just add this line
ini_set('display_errors', true);
somewhere in your controller before you called the library or in the beginning of the library and everything should work.检查模型的加载,这是一个常见的错误,即使
在模型未正确加载时显示错误,错误也不会显示
Check the loading of model this is a frequent mistake even if you show error
when model is not loaded properly error wont show