久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php怎么顯示錯(cuò)誤行數(shù)

      在php中,可以使用異常處理類Exception中的getLine()函數(shù)來顯示錯(cuò)誤行數(shù),該函數(shù)可返回返回發(fā)生錯(cuò)誤的代碼行號(hào),語法“final public Exception::getLine(): int”。

      php怎么顯示錯(cuò)誤行數(shù)

      本教程操作環(huán)境:windows7系統(tǒng)、PHP7.1版,DELL G3電腦

      PHP 中提供了內(nèi)置的異常處理類——Exception,該類中的成員函數(shù)getLine()可返回發(fā)生錯(cuò)誤的代碼行號(hào)

      Exception::getLine — 獲取創(chuàng)建的異常所在文件中的行號(hào)

      語法:

      final public Exception::getLine(): int

      返回值:返回發(fā)生錯(cuò)誤的代碼行號(hào)。

      示例:

      <?php header("Content-type:text/html;charset=utf-8"); try {     throw new Exception("一些錯(cuò)誤消息"); } catch(Exception $e) {     echo "錯(cuò)誤發(fā)生在第: " . $e->getLine()."行"; } ?>

      輸出結(jié)果:

      php怎么顯示錯(cuò)誤行數(shù)

      推薦學(xué)習(xí):《PHP視頻教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)