How to set up a custom directory structure in ThinkPHP, how to set up thinkphp_PHP tutorial

WBOY
Release: 2016-07-13 10:20:52
Original
910 people have browsed it

How to set up a custom directory structure in ThinkPHP, how to set up thinkphp

The effect is as shown in the picture:

Entry file

<&#63;php
// 应用入口文件
 
// 检测PHP环境
if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !');
 
// 网站文件入口位置
define('ABSPATH', dirname(__FILE__) . '/');
 
// 定义应用目录
define('APP_NAME', 'WEBSITE');
define('APP_PATH','./include/');
define('CONF_PATH', ABSPATH . '/config/');
define('RUNTIME_PATH', ABSPATH . '/cache/');
define('TMPL_PATH', ABSPATH . '/templates/');
define('UPLOAD_PATH', ABSPATH . '/uploads/');
define('THINK_PATH', APP_PATH . '/ThinkPHP/');
 
// 开启调试模式
define('APP_DEBUG',True);
 
// 引入ThinkPHP入口文件
require THINK_PATH . 'ThinkPHP.php';

Copy after login

Configuration file

<&#63;php
return array (
 'DEFAULT_MODULE' => 'APP',
 'URL_MODEL' => '2',
 'TMPL_PARSE_STRING'=> array(
 '__PUBLIC__' => __ROOT__.'/static',
 '__UPLOAD__' => __ROOT__.'/uploads'
 ),
 'TMPL_FILE_DEPR' => '_',
);
Copy after login

How does thinkphp deploy the directory structure? The manual is confusing. He recommends two directory structures, and those folders that are automatically generated

You will know after you try it yourself!
Common project public functions

Conf project settings

Lang language pack

Lib operation module

Runtime cache

Tpl template File

How to set the project public file directory in thinkphp

After decompression, put it into the system directory and set it to run in compatibility mode. Then, put the ORG class library package of the original system base class library into the new version of the base class library directory. Clear the project and compile what is the framework of php ThinkPHP again

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/864479.htmlTechArticleHow to set up a custom directory structure in ThinkPHP. The effect of the thinkphp setting method is as shown in the figure: Entry file php// Application entry file // Detect PHP environment if(version_compare(PHP_VERSION,...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!