English 中文(简体)
A. 取样器具中的错误
原标题:catching errors in ajax scripts with php

为了方便脱胎工作,我把错误的手稿引入我的PHP代码,收集所有错误、警告等,并记录数据库的查询,并在该页末显示管理人员贴在现场。

I d like to do something similar for ajax queries. And more generally I would like to integrate the two error panels together, but I am at a loss for a good method to do it.

关于我所想的粗略想法是一站式小组,在页上有错误,包括文稿中的错误。

我已经能够组成人口小组,并填充来自亚克斯要求的数据。

I thought of using the comet pattern for the error window and registering an exit handler with php that sends a http request that passes the errors to the window somehow, but I am not quite sure of how to go about doing this and how to tie it all to the php session(so that user don t see other s errors for example.)

有什么想法可以做到这一点? 我看上去什么简单?

最佳回答

奥基是我结束的工作,似乎工作良好:

我写了一套实验室功能,收集了页上的所有错误,并制作了一个特别格式的四级“系统误差”。 它载有一名档案管理员,其名称来自档案,并载有一份错误清单。 让我们说,这项职能被称为“xx_error_get(filename)”

然后,我有每张麻风.,作为其成果的一部分。 我也说了话。

echo xx_error_get(__FILE__);

在归还的XML标的末尾。

回到我的主页,我给我的身体增添了一个隐藏的影子,上面有“系统时代”。

然后,我在(文件)中增加了几行。 ready:

    $(document).ajaxSuccess(function(e, xhr, settings) {
                    $("#systemTemp").html(xhr.responseText);
                    $("#systemError").prepend($("#systemTemp").children(".systemError").html());
                    $(".systemError").remove();
                    $("#systemTemp").empty();
                    $("#systemError").accordion("destroy");
                    $("#systemError").accordion({autoHeight:false});            
    });

这不是最干净的法典,但我希望这对任何人都是有益的。

问题回答

暂无回答




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签