<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [Xunsearch PHP-SDK](http://www.xunsearch.com) v1.4.8 API 參考文檔 # XSException [All Packages](#)| [屬性](#)| [方法(函數)](#) | 包 | [XS](#) | |-----|-----| | 繼承關系 | class XSException ?Exception | | 子類 | [XSErrorException](#) | | 版本 | 1.0.0 | | 源代碼 | [sdk/php/lib/XS.class.php](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XS.class.php) | XS 異常類定義, XS 所有操作過程發生異常均拋出該實例 ### Protected 屬性 [隱去繼承來的屬性](#) | 名稱 | 類型 | 描述 | 定義于 | |-----|-----|-----|-----| | code | | | Exception | | file | | | Exception | | line | | | Exception | | message | | | Exception | ### Public 方法 [隱去繼承來的方法](#) | 名稱 | 描述 | 定義于 | |-----|-----|-----| | __construct() | | Exception | | [__toString()](#) | 將類對象轉換成字符串 | XSException | | getCode() | | Exception | | getFile() | | Exception | | getLine() | | Exception | | getMessage() | | Exception | | getPrevious() | | Exception | | [getRelPath()](#) | 取得相對當前的文件路徑 | XSException | | getTrace() | | Exception | | getTraceAsString() | | Exception | ### 方法明細 __toString()方法 <table class="summaryTable"><tr><td colspan="3"><div class="signature2">public string <b>__toString</b>()</div></td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">異常的簡要描述信息</td></tr></table> **源碼:**[sdk/php/lib/XS.class.php#L67](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XS.class.php#L67) (**[顯示](#)**) `public?function?__toString() { ????$string?=?'['?.?__CLASS__?.?']?'?.?$this->getRelPath($this->getFile())?.?'('?.?$this->getLine()?.?'):?'; ????$string?.=?$this->getMessage()?.?($this->getCode()?>?0???'(S#'?.?$this->getCode()?.?')'?:?''); ????return?$string; }` 將類對象轉換成字符串 getRelPath()方法 <table class="summaryTable"><tr><td colspan="3"><div class="signature2">public static string <b>getRelPath</b>(string $file)</div></td></tr><tr><td class="paramNameCol">$file</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">需要轉換的絕對路徑</td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">轉換后的相對路徑</td></tr></table> **源碼:**[sdk/php/lib/XS.class.php#L79](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XS.class.php#L79) (**[顯示](#)**) `public?static?function?getRelPath($file) { ????$from?=?getcwd(); ????$file?=?realpath($file); ????if?(is_dir($file))?{ ????????$pos?=?false; ????????$to?=?$file; ????}?else?{ ????????$pos?=?strrpos($file,?'/'); ????????$to?=?substr($file,?0,?$pos); ????} ????for?($rel?=?'';;?$rel?.=?'../')?{ ????????if?($from?===?$to)?{ ????????????break; ????????} ????????if?($from?===?dirname($from))?{ ????????????$rel?.=?substr($to,?1); ????????????break; ????????} ????????if?(!strncmp($from?.?'/',?$to,?strlen($from)?+?1))?{ ????????????$rel?.=?substr($to,?strlen($from)?+?1); ????????????break; ????????} ????????$from?=?dirname($from); ????} ????if?(substr($rel,?-1,?1)?===?'/')?{ ????????$rel?=?substr($rel,?0,?-1); ????} ????if?($pos?!==?false)?{ ????????$rel?.=?substr($file,?$pos); ????} ????return?$rel; }` 取得相對當前的文件路徑 Copyright ? 2008-2011 by [杭州云圣網絡科技有限公司](http://www.xunsearch.com) All Rights Reserved.
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看