php获取调用本方法的上个方法,php堆栈,函数入库匿名 · 更新于 2019/1/12 $array =debug_backtrace(); //print_r($array);//信息很齐全 unset($array[0]); $html = ''; foreach($array as $row) { $html .=$row['file'].':'.$row['line'].'行,调用方法:'.$row['function']."<p>"; } var_dump($html); 上一篇PHP计算两个时间之间相差天数(包括自然天)下一篇PHP 加密、解密工具Zend Guard和ionCube