tp5 custom profiles

The first method: directly in the app -> config.php file inside to add 

The second method: build config folder in the app at the same level, the establishment of the config.php file in a folder inside

return [
    'xuzhan' => 'www.php.cn',
];

Then modify the project file entry: Adding custom configuration directory

# Defined application directory 
DEFINE ( 'APP_PATH', __DIR__ '/../application/'. );
 # Define the configuration directory (CONF_PATH is a system constant) 
DEFINE (. 'CONF_PATH', __DIR__ '/../config/' );
 # define cache directory 
dEFINE ( 'RUNTIME_PATH', __DIR __ '/ .. / Runtime /'. );
 # file loading frame guide 
the require . __DIR__ '/../thinkphp/start.php';

Then you can normally call

Guess you like

Origin www.cnblogs.com/paopao123/p/11119646.html