📄 function.debug-print-backtrace.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Prints a backtrace</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.debug-backtrace.html">debug_backtrace</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.error-get-last.html">error_get_last</a></div> <div class="up"><a href="ref.errorfunc.html">Error Handling Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.debug-print-backtrace" class="refentry"> <div class="refnamediv"> <h1 class="refname">debug_print_backtrace</h1> <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">debug_print_backtrace</span> — <span class="dc-title"> Prints a backtrace </span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type"><span class="type void">void</span></span> <span class="methodname"><b><b>debug_print_backtrace</b></b></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> <b>debug_print_backtrace()</b> prints a PHP backtrace. It prints the function calls, included/required files and <a href="function.eval.html" class="function">eval()</a>ed stuff. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> This function has no parameters. </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> No value is returned. </p> </div> <div class="refsect1 examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example"> <p><b>Example #1 <b>debug_print_backtrace()</b> example</b></p> <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">// include.php file<br /><br /></span><span style="color: #007700">function </span><span style="color: #0000BB">a</span><span style="color: #007700">() {<br /> </span><span style="color: #0000BB">b</span><span style="color: #007700">();<br />}<br /><br />function </span><span style="color: #0000BB">b</span><span style="color: #007700">() {<br /> </span><span style="color: #0000BB">c</span><span style="color: #007700">();<br />}<br /><br />function </span><span style="color: #0000BB">c</span><span style="color: #007700">(){<br /> </span><span style="color: #0000BB">debug_print_backtrace</span><span style="color: #007700">();<br />}<br /><br /></span><span style="color: #0000BB">a</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">?></span></span></code></div> </div> <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">// test.php file<br />// this is the file you should run<br /><br /></span><span style="color: #007700">include </span><span style="color: #DD0000">'include.php'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?></span></span></code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents"><pre><div class="cdata"><pre>#0 eval() called at [/tmp/include.php:5]#1 a() called at [/tmp/include.php:17]#2 include(/tmp/include.php) called at [/tmp/test.php:3]#0 c() called at [/tmp/include.php:10]#1 b() called at [/tmp/include.php:6]#2 a() called at [/tmp/include.php:17]#3 include(/tmp/include.php) called at [/tmp/test.php:3]</pre></div> </pre></div> </div> </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.debug-backtrace.html" class="function" rel="rdfs-seeAlso">debug_backtrace()</a></li> </ul> </p> </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.debug-backtrace.html">debug_backtrace</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.error-get-last.html">error_get_last</a></div> <div class="up"><a href="ref.errorfunc.html">Error Handling Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -