English 中文(简体)
PHP: 突然终止一项请求的影响*
原标题:PHP: Implications of a abrupt termination of a request by a *fatal* error

我有奇怪的情况。

我的申请记录显示,档案中有许多痕量记录。 (我不知道如何使用我的框架记录。) 能够核实这一点。

问题在于,如果申请被fatal错误(仅是致命的)[例如:“房租错误:要求某一成员履行某种非目标的职能”]终止,我最后没有记录,甚至记录在我方言执行期间应较早的记录。

(Yes,我试图冲积标志,这也有助于。) 它像以致命错误终止申请一样,在某种程度上取消了对先前申请点所处理档案的书面材料。

这里有什么想法?

谢谢。

最佳回答

显然,帕斯卡尔提到的致命错误的致命性并不是100%的致命性。

The below allowed me to have my logs even on fatal errors:

function correctShutdown()
{
   logger->flush();
}

register_shutdown_function( correctShutdown );
问题回答

“Fatal Error is... well...Fatal: 它停止执行该书,而执行书不会做任何本应做的事情。


In your case, I suppose your logging framework logs into memory -- and that this in-memory log is only written to the file when the processing of the request is done.
Some logging mecanisms do that, to avoid writing to a file several times, at different points during the generation of the response (which means keeping the file locked, to avoid concurrency problems ; or opening-closing-reopening-reclosing-... it)

当你拿到法特·埃罗尔时,在反应一代结束时应当进行的正常运行不叫——因此,在案卷上没有书写。

现在,唯一能够肯定的办法是检查贵国框架的伐木扫描情况。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签