<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="Header navigation table"><tbody><tr><th align="center" colspan="3">Smarty - the compiling PHPtemplate engine</th> </tr><tr><td valign="bottom" align="left" width="25%"><a accesskey="P" href="api.register.object.html">Prev</a></td> <td valign="bottom" align="center" width="50%">Chapter 13. Smarty Class Methods()</td> <td valign="bottom" align="right" width="25%"><a accesskey="N" href="api.template.exists.html">Next</a></td> </tr></tbody></table> # registerResource()[注冊資源] Name registerResource() ― dynamically register resources 動態注冊資源 Description void registerResource(string name,array resource_funcs); Use this to dynamically register a resource plugin with Smarty. Pass in the name of the resource and the array of PHP functions implementing it. See template resources for more information on how to setup a function for fetching templates. 本函數動態注冊一個Smarty資源插件,必須傳遞兩個參數:資源的名稱和php函數數組。關于如何建立一個函數獲取模板請看[模板資源](#)部分。 <table width="80%" border="0" cellpadding="2" cellspacing="2" class="note"><caption> 提示 </caption> <tr><td>Technical Note<br/> A resource name must be at least two characters in length. One character resource names will be ignored and used as part of the file path, such as $smarty-&gt;display('c:/path/to/index.tpl');<br/> 資源的名稱至少由兩個字符組成。只有一個字符的資源名稱會被忽略,并被視為文件路徑的一部分,比如$smarty-&gt;display('c:/path/to/index.tpl');。</td> </tr></table> The php-function-array resource_funcs must have 4 or 5 elements. With 4 elements the elements are the functions-callbacks for the respective source, timestamp,secure and trusted functions of the resource. With 5 elements the first element has to be an object reference or a class name of the object or class implementing the resource and the 4 following elements have to be the method names implementing source, timestamp, secure and trusted. 第二個參數“resource_funcs”必須包含4或5個元素。 包含4個元素的情況為回調函數元素,分別處理資源的“source 資源”、“timestamp 時間戳”、“secure 安全”、“trusted 可信的”的函數。 5個元素的情況為:第一個元素必須是一個對象的引用,或者是對象所在的類名,或者是執行資源的類。后面的4個元素是實現處理“source 源文本”、“timestamp 時間戳”、“secure 安全”、“trusted 可信的”的方法名。 <table class="EXAMPLE" cellspacing="0" cellpadding="0" border="0" width="100%"><tbody><tr><td> <div class="EXAMPLE"><a name="AEN31330" id="AEN31330"/> <b><span class="PROGRAMLISTING">Example 13.30. registerResource()</span><br/></b><table width="100%" bgcolor="#e0e0e0" border="0"><tbody><tr><td> <pre class="PROGRAMLISTING">&lt;?php$smarty-&gt;register-&gt;resource('db', array( 'db_get_template', 'db_get_timestamp', 'db_get_secure', 'db_get_trusted') );?&gt;</pre> </td> </tr></tbody></table><p> 參見<a href="api.unregister.resource.html">unregisterResource()</a>和模板<a href="template.resources.html">資源</a>章節。</p> </div> </td> </tr></tbody></table> <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="Footer navigation table"><tbody><tr><td valign="top" align="left" width="33%"><a accesskey="P" href="api.register.object.html">Prev</a></td> <td valign="top" align="center" width="34%"><a accesskey="H" href="index.html">Home</a></td> <td valign="top" align="right" width="33%"><a accesskey="N" href="api.template.exists.html">Next</a></td> </tr><tr><td valign="top" align="left" width="33%">registerObject()<br/> 注冊對象 </td> <td valign="top" align="center" width="34%"><a accesskey="U" href="api.functions.html">Up</a></td> <td valign="top" align="right" width="33%">templateExists()<br/> 模板是否存在</td> </tr></tbody></table>
                  <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>

                              哎呀哎呀视频在线观看