This article brings you relevant knowledge about thinkphp, which mainly introduces related issues about how to set up the configuration environment and run it, including the installation of the PHP development environment, as well as the download and download of thinkphp. Let's take a look at the operation. I hope it will be helpful to everyone.
Recommended study: "PHP Video Tutorial"
php still has a large market share in the existing market Very high, many small and medium-sized enterprises use PHP for backend and API management and development, including some of the business of many large companies, which are also written and maintained by PHP.
With the development of PHP, many cms (Dreamweaver, Empire, phpcms, discuz, etc.) have appeared, and many PHP frameworks have appeared (Thinkphp, laravel, Yii , Zend, etc.)
First of all, let’s talk about how to install the php development environment, that is, how to run the php file Come on, we will use Windows as an explanation in this section.
phpStudy is very simple to use. After installation, it will look like this page.
You can choose to start apache or nginx. These two are alternatives. If you need to operate the database, enable the database as well.
The environment has been Once installed, how do we create a website and make it run normally?
After clicking to create a new website, there will be a pop-up window like this
Domain Name Here, directly fill in a domain name, and you can directly access your website through the domain name you set locally. In the project, a mapping is actually added to the hosts file. When you fill in the domain name, it will create a directory by itself, and just place the program to be run in the generated directory.
At this step, we have already created the environment and project directory. The first creation will automatically put a few files in the directory by default. If they are not needed, just delete them
At this point, the installation of phpStudy and the creation of the project directory are completed
After we have installed phpStudy, then To download thinkphp
First open thinkphp official website download address: https://www.thinkphp.cn/down/framework.html
These You can download both, select a version, and then click download to download
Extract the downloaded compressed package into the project directory you just created
In this way, it is not finished yet. We still need to do one more step, that is, adjust the website directory to the public folder, follow the steps below, manage-> Modify->Root directory
Add a /public
in the root directory and fill it in when entering the website you just created in the browser If you open the domain name and display this interface, it means that your Thinkphp has been installed
Recommended study: "PHP Video Tutorial》
The above is the detailed content of Detailed graphic explanation of how thinkphp configures the environment to run. For more information, please follow other related articles on the PHP Chinese website!