tp5.0 multi-entry file

Demand is accessible through the front desk domain by domain name / admin access background

Plus a admin / index.php file to copy a .htaccess file in public under the public directly.

In the public / admin / index.php write

// define application directory 
DEFINE ( 'root_path', dirname (dirname (dirname (__ FILE__))));

// [background application entry file]
// defined application directory
define ( 'APP_PATH', dirname ( dirname (dirname (__ FILE__) .)) '/ the Application /');

// bind admin module
define ( 'BIND_MODULE', 'admin / Login / login'); # this is the stage door of the home page can be customized access rules are: module / controller / method

// loading frame guide files
require dirname (dirname (dirname (__ FILE__))). '/thinkphp/base.php';// loading frame base file

// need to do
\ think \ App :: route (false ) ; // close the route, must be written after the basic framework for the implementation before

\ think \ App :: run () -> send (); // execute application

Guess you like

Origin www.cnblogs.com/blange/p/11316472.html