我在PHP脚本中得到了一个致命的"Call to a member function on a non-object"错误,但我无法准确地找到在哪里发生,也无法找到原因。错误信息几乎是无用的,因为它描述的行在99.9%的时间内工作。
有没有方法可以获得当前的调用堆栈,跟踪在此致命错误之前正在进行的调用,或者做任何其他事情来帮助跟踪此错误?
我正在做一个小程序,当错误发生时,它需要读取错误信息。
例如,一个操作触发了一个错误,php日志将其记录为:
PHP Fatal error: Smarty error: [in /mnt/n2my_web/templates/ja_JP/mail/reservation_create.t.txt line 16]: syntax error: mismatched tag {/if}. (Smarty_Compiler.class.php, line 2338) in /mnt/n2my_web/lib/Smarty/Smarty.class.php on line 1092
我知道通过设
<?php
require_once"includes/strings.php";
require_once"php/function.php";
require_once"php/config.php";
require_once"php/app.php";
$currentFBuserid = "0";
///////FACEBOOK GET USER INFORMATION
session_start();
// Enter the app id and secret below
define(
我向URL请求使用Goutte获取数据。但是我提出请求的服务器速度很慢。所以有时候拉拉会抛出错误的时间。当出现此错误时,我必须在数据库中输入此错误日志,并添加一些附加数据(例如,id等)。我在网上搜索过。但我找到了所有与定制错误信息等相关的解决方案,我想要的是当laravel抛出时间错误时,我必须输入数据库中的附加数据,然后重定向页面。如果有人知道解决办法,我们将不胜感激。
这是我的密码。
use Goutte\Client;
class WebScrapingController extends Controller {
public function index() {
我访问一个包含类环境中的函数,该函数可以抛出一个Alert,它需要将用户引导回包含一些错误信息的页面。对我来说,引用页面的最佳方式是什么,以便在任何地方访问该函数时都可以使用它?
有没有更好的方法来做我想做的事情?
public function checkEnvironment() {
try {
// If status is false
if (!$this->getStatus()) {
// Generate a new special exception with code
如果我使用不带参数的proc Name,如何将标准错误消息传递到本地消息
我希望解压我自己的错误信息,而不是像这样的全局错误消息
proc adder {a b} {
global errorInfo
puts "The stack trace was this:\n$errorInfo"
puts "I got an error in an event: adder arguments $a $b"
}
->
adder
Error: wrong # args: should be "adder a b"
我有w3总缓存错误信息。我从wp-content (advanced-catch.php,db.php,w3tc-config.php)中删除文件,然后删除w3插件。并再次重新安装此插件。
但是我有相同的错误信息。
W3 Total Cache Error: Files and directories could not be automatically created to complete the installation.
请手动执行命令
或者使用FTP表单允许W3总缓存自动生成
任何帮助..。?
谢谢