展开PHP堆栈跟踪参数 [英] Expand PHP Stack Trace Arguments

查看:101
本文介绍了展开PHP堆栈跟踪参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发中的PHP应用程序返回的堆栈跟踪中,在错误页面上显示时,函数的长字符串参数将被截断:

On a stack trace returned from a PHP application in development, long string arguments to a function are truncated when display on the error page:

Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO "tb...', Array)

如何扩展查询参数以使全文可见?服务器正在运行PHP 5.3.3.

How can I expand the query argument so the full text is visible? The server is running PHP 5.3.3.

推荐答案

请改用 debug_backtrace .据我所知,它将为您提供完整的跟踪信息,并且不会修剪参数.

Use debug_backtrace instead. It will give you the whole trace and doesn't trim arguments as far as I know.

再三考虑:您可能会通过使用

On a second thought: You might get away with it by using

try {
   ...
} catch (Exception $e)
   var_dump($e->getTrace());
}

相反.

这篇关于展开PHP堆栈跟踪参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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