未显示库中的错误 - Code Igniter / PHP

发布于 2024-12-22 04:54:17 字数 56 浏览 5 评论 0原文

Code Igniter 中的库中的错误在某些服务器配置中不会显示。
如何手动覆盖该设置?

Errors in libraries in Code Igniter aren't displayed in some server configurations.
How can that setting be overridden manually?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

迎风吟唱 2024-12-29 04:54:17

在主索引页中添加 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.

隔岸观火 2024-12-29 04:54:17

将主 index.php 文件中的环境更改为开发环境。

搜索行 define('ENVIRONMENT', 'development');

change environment in your main index.php file to development.

search for line define('ENVIRONMENT', 'development');

过期情话 2024-12-29 04:54:17

只需在调用库之前或在库的开头添加此行 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.

甜心小果奶 2024-12-29 04:54:17

检查模型的加载,这是一个常见的错误,即使

ini_set('display_errors', true);

在模型未正确加载时显示错误,错误也不会显示

$this->load->model('model_name');

Check the loading of model this is a frequent mistake even if you show error

ini_set('display_errors', true);

when model is not loaded properly error wont show

$this->load->model('model_name');
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文