: This article mainly introduces owncloud Source Code Analysis 9-scattered content. if you are interested in the PHP Tutorial, please refer to it. 1. add the root directory to the route
The location is:
Line 145 of \ lib \ private \ route \ router. php,
For example:
Add a line to the row 145 of the above file:
// Test
Require_ Once 'test/routes. php ';
Add a root directory of test, and then add the route file routes. php under the root directory. the content is as follows:
/**
* Copyright (c) 2012 Bart Visscher < Bartv@thisnet.nl > * This file is licensed under the Affero General Public License version 3 or * Later. * See the COPYING-README file. */ Namespace OC \ Test; $ this-> create ('test _ test', 'Test/test')-> actionInclude ('test/test. php ');
Add a file named test. php to the test folder. the content is as follows:
/**
* Created by PhpStorm. * User: sunny * Date: 2015/9/18 * Time: 16: 18 */Echo "hahahaha ";You can use the address http://sunny.ownclouddemo.com/index.php/test/test.pdf to access this test.php file, as shown below:
So far, the root directory is added to the folder and accessible.
To continue...
The above introduces owncloud Source Code Analysis 9-the scattered content, including the content, hope to be helpful to friends who are interested in PHP tutorials.