$array =debug_backtrace(); //print_r($array);//信息很齐全 unset($array[0]); foreach($array as $row) { $html .=$row['file'].':'.$row['line'].'行,调用方法:'.$row['function']."<p>"; } return$html;