展开 PHP 堆栈跟踪参数 [英] Expand PHP Stack Trace Arguments
本文介绍了展开 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屋!
查看全文