php 错误处理经验分享(3)


<?php
function one($str1, $str2)
{
two("Glenn", "Quagmire");
}
function two($str1, $str2)
{
three("Cleveland", "Brown");
}
function three($str1, $str2)
{
print_r(debug_backtrace());
}

one("Peter", "Griffin");
?>


输出:

Array
(
[0] => Array
(
[file] => C:\webfolder\test.php
[line] => 7
[function] => three
[args] => Array
(
[0] => Cleveland
[1] => Brown
)
)
[1] => Array
(
[file] => C:\webfolder\test.php
[line] => 3
[function] => two
[args] => Array
(
[0] => Glenn
[1] => Quagmire
)
)
[2] => Array
(
[file] => C:\webfolder\test.php
[line] => 14
[function] => one
[args] => Array
(
[0] => Peter
[1] => Griffin
)
)
)

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/35dfb9856293dafddb58e7fa05feca2c.html