有没有办法在PHP中编码错误消息 [英] Is there a way to encode error messages in PHP

查看:86
本文介绍了有没有办法在PHP中编码错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,YouTube页面崩溃时,会发出一种编码信息,可以发送给Youtube的开发者,而不需要客户了解YouTube基础架构和使用的程序。

I've noticed when a youtube page crashes it puts out a kind of encoded message which can be send to the developers of Youtube without the customers gaining knowledge about the Youtube infrastructure and used programms.

这个想法与您自己的网站有关吗?

Is this idea a practice to do with your own sites?

推荐答案

您不需要它使用PHP。

与Flash不同,PHP正在运行服务器端。所以,只需让PHP记录任何错误信息。

在php.ini文件中设置这些选项

You don't need it with PHP.
Unlike Flash, PHP is running server-side. So, just make PHP to log whatever error messages.
Set these options in your php.ini file

log_errors = On
display_errors = Off

,您不需要志愿者用户查看他们

,但只有您的网络服务器的错误日志才能窥视

and you will need no volunteer users to see them
but only your web-server's error log to peek into

这篇关于有没有办法在PHP中编码错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆