如何在php错误日志中制作/引起php错误 [英] How to make / provoke an php error in php error log

查看:70
本文介绍了如何在php错误日志中制作/引起php错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想查看我的php_error.log文件是否正常工作,但我不知道如何产生将在日志文件中显示的错误。

i want to see if my php_error.log file works but I don't know how to produce an error that will show up in the log file.

感谢您的帮助!

推荐答案

<?php 
asd();
?>

将此保存并作为网页打开

save this and open it as webpage

错误应类似于

[Thu Mar 29 10:28:41 2012] [error] [client 106.132.155.92] PHP Fatal error:  Call to undefined function asd() in * on line 2
[Thu Mar 29 10:28:41 2012] [error] [client 106.132.155.92] PHP Stack trace:
[Thu Mar 29 10:28:41 2012] [error] [client 106.132.155.92] PHP   1. {main}() *:0

这篇关于如何在php错误日志中制作/引起php错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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