1、根目錄加入路由
位置在:
libprivaterouterouter.php的145行,
例如:
先在上面檔案的145行加入一行:
然後再在根目錄下加入路由文件routes.php,內容如下:<span>//测试 </span><span><strong>require</strong>_once </span><span>'test/routes.php'</span><span>;</span>
<span><?php </span><span><em>/** </em></span><span><em> * Copyright (c) 2012 Bart Visscher </em></span><span><em>bartv@thisnet.nl</em></span><span><em>> </em></span><span><em> * This file is licensed under the Affero General Public License version 3 or </em></span><span><em> * later. </em></span><span><em> * See the COPYING-README file. </em></span><span><em> */ </em></span><span><em></em></span><span>namespace </span><span>OC\Test</span><span>; </span><span></span><span>$this</span><span>-></span><span>create</span><span>(</span><span>'test_test'</span><span>, </span><span>'test/test'</span><span>) </span><span> -></span><span>actionInclude</span><span>(</span><span>'test/test.php'</span><span>)</span><span>;</span></span>