Ready to work
- 1 XAMPP official website download address
- 2 PHPStorm official website download address
- 3 PHPStorm registration activation
XAMPP
Install
XAMPP is a development environment toolkit that integrates Apatch and Mysql.
After downloading, go to the next step to complete the installation. After installation, 应用程序
you can see XAMPP in . Click manager-osx
to start
configure
Modify the root directory
XAMPP integrates basic components such as Apache and Mysql required by the PHP development environment. But the root directory that comes with the system is /Applications/XAMPP/htdocs
. Sometimes we want to change the website root directory to our custom directory folder. This can be achieved in the following ways
- 1 Open the application->XAMPP->xamppfiles->etc->httpd.conf document (open with a text editor)
- 2
commond+f
SearchDocumentRoot
and find the following results
- 3 Modify the path in DocumentRoot and Directory to the path you want, the two paths should be the same
PHPStorm
Install
After downloading PHPStorm, the next step can be installed successfully
configure
- Set the development directory
Click after opening PHPStorm Create New Project
, and then select the directory to XAMPP
the root directory set above.
- Configure the PHP development environment
When the project is created and then click Run, the upper right corner will appear as shown below
Solution:
Click PHPStorm—>Preferences to jump to the following page.
After interpreter
selecting the PHP environment path. It will jump to the page shown in Figure 1-3 below. Add PHP, and PHP executable
then select the folder under the XAMPP installation directory bin
. The system will automatically identify the PHP installed version. After clicking ok, you can develop