我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

PHP如何打开浏览器错误日志记录

For example if my PHP script throws an error I want it to print to the browser. I am on a linux box Debian 5.0

Put this that the top of your php file:

//*DEBUG ERROR REPORTING
ini_set('display_errors', 1); 
ini_set('log_errors', 1); 
ini_set('error_log', dirname(__FILE__) . '/error_log.txt'); 
error_reporting(E_ALL);
//END DEBUG ERROR REPORTING*/

Set the ini variable display_error to 1, to display errors to the browsers.

近期文章

  • 具有不同用户级别的php mysql登录系统[关闭]
  • 简单的重写规则在本地但不在线
  • 来自twitter API的“无法验证您”错误
  • 如何使用PHP将单词文本数据转换为html
  • 如何通过表单发送javascript收集的数据
  • 混合表单和mysql数据库查询的问题
  • Mysql将数据从数组插入多个表
  • 在php / mysql站点中实现搜索的选项
  • 如何将图像文件存储在站点的后端
  • 配置我的php.ini运行Facebook php sdk
  • 重构基于PHP的IP过滤器以使用IPv6
  • 你能用PHPmailer从localhost发送电子邮件吗?
  • 在执行此命令时出现的错误
  • 如何使用PHP加载多个外部文件 - 快速?
  • 列值总和直到当前记录
  • MySQL if / else语句依赖MySQL结果[关闭]
  • Facebook SDK,如何将用户名放入墙贴?
  • 默认值被空值覆盖
  • PHP缓存安全性:文件缓存与内存缓存
  • php中的socket_connect上的“连接被拒绝”错误

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华