Home > PHP Framework > ThinkPHP > body text

Learning: ThinkPHP deployment directory

藏色散人
Release: 2020-11-20 14:32:01
forward
3208 people have browsed it

The following is an introduction to the ThinkPHP deployment directory from the thinkphp framework tutorial column. I hope it will be helpful to friends in need!

1. Problem: I was very confused about the directory structure when writing the project according to the deployment directory instructions in document 2.2.3
2. Solution: (Officially gives two deployment solutions)
1. Official recommendation Solution
Official recommended solution: (Table of contents as shown below)

#Operation Steps:

1.1 Download the ThinkPHP software package, create a new TESTAPP directory, and put the ThinkPHP folder into the TESTAPP folder.

1.2 If necessary Create the front-end directory Home and the back-end directory Admin, and create a new entry file index.php in the TESTAPP folder (used to create the Home directory). The code is as follows:

Copy after login

1.3 Create a new entry file admin.php in the TESTAPP folder (used to create the Admin directory). The code is as follows:

Copy after login

1.4 After the two files are written, enter them in the browser. http://localhost/bbs/index.php automatically generates the Home folder, enter http://localhost/bbs/admin.php

When you see the Welcome to thinkPHP prompt, the directory structure is as shown in the figure:

Deployment Finish.

1.5 Start writing code

If you need a User controller, create a new UserAction.class in the Admin folder. php, write the following code:

##

user=M('user')->select();
  
        
        $this->display();    
    }
Copy after login
}
Copy after login

Create a new folder Home in tpl, create a new File index.html, write the following code:

##




    
    Document
    
     
     

添加
{$vo.username} 修 改
Copy after login
Configure database information in config.php in Conf in the Admin folder

Enter the URL http://localhost/TESTAPP/admin.php/User/index, you can see the results

2. Group module solution (will be added after testing)

The above is the detailed content of Learning: ThinkPHP deployment directory. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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 [email protected]
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!