Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The Construction of ThinkPHP Framework and its Common problems

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "the construction of ThinkPHP framework and frequently asked questions". In daily operation, I believe many people have doubts about the construction of ThinkPHP framework and frequently asked questions. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "building ThinkPHP framework and frequently asked questions". Next, please follow the editor to study!

The first part: frame building

I am also new to ThinkPHP, so record my current experience and learning steps in a way that I think is easier to understand.

The first thing to use ThinkPHP is to set up the environment. Here are two general steps:

Step 1: download the software

1. Xmapp (this software integrates Apache, MySQL, etc., and is easy to use)

2. Download ThinkPHP3.2.3

Step 2: build the framework

1. After installing xmapp, we can see a htdocs folder, and we can extract the downloaded ThinkPHP3.2.3 to this folder

2. Run XAMPP Control, and open Apache and MySQL, as shown in the following figure

3. Open the browser, type localhost, and enter enter. Normally, the following interface will appear.

4. If the above interface appears, it means that the basic framework has been built successfully! And we noticed that there is an extra dashboard after the browser address bar, because we haven't changed anything, so it displays the page under dashboard by default.

Part II: frequently asked questions

First: XAMPP installation failed

Method 1: you can restore all the previous operations, that is, uninstall the XAMPP, restore or delete all the configuration files you should have, and then reinstall them. I have done this, and experiments have shown that it is possible.

Method 2: download and install the vcredist_x86 in my network disk, and then install XAMPP. I think this is better, because if not, it seems that there will be problems later. I am not very clear. I just explained my solution.

Second: Apache failed to start

The first case: Port 80 is occupied

Solution:

1. The simplest and rudest way: change the port number in the configuration file to something else, as follows:

A. Open XAMPP, click the Config button corresponding to Apache, select the first line: Apache (httpd.config), and modify the partial configuration of the document.

B, Ctrl+f, search 80, respectively find the location shown in the figure, modify 80 to other ports, I modified to 81, this to enter netstat-an in the command line to see which ports of your computer are occupied, or directly in the upper right corner of XAMPP click the button Netstat to view the choice of ports that are not occupied.

C. After modification, starting Apache again will OK. If it still fails, please see one of the following failures.

2. Check the port occupancy, find the process that occupies port 80, open the task manager and kill the process. I may be a little inaccurate here, but the method is like this, so I won't talk about the specific measures, because my amendment will involve other places.

The second case: Port 443 is occupied, because in addition to port 80, the startup of Apache will also occupy port 443.

Solution:

1. The first method is the one mentioned above, which kill the process that occupies port 443.

2. There is also a simple way to open the httpd-ssl.conf file under the xampp installation directory (C:\ xampp\ apache\ conf\ extra\ httpd-ssl.conf), the C disk I installed, or click the Config button of Apache in xampp, select httpd-ssl.conf, find Listen 443, and change port 443 to 4433 or other

3. Open the XAMPP installation directory, modify the\ apache\ conf\ httpd.conf file, find the sentence Include "conf/extra/httpd-ssl.conf", and comment it out.

The third case: lack of VC runtime, download the vcredist_x86 installation from my network disk, as mentioned earlier.

Third: MySQL failed to start

1. 3306 port problem, the solution is similar to the above

At this point, the study of "Building the ThinkPHP framework and frequently asked questions" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report