PhpStorm40&50 deploy local web applications

PHP中文网
Release: 2023-02-28 22:38:01
Original
1514 people have browsed it

1. Create a new project (project). After the creation is completed, click the drop-down menu of Application Run/Debug (Select Run/Debug Configuration) on the toolbar to pop up the Edit Cofigurations option. Click to enter the editing dialog box. (Or use run - edit configuration on the menu bar). As shown below

PhpStorm 40 & 50 部署本地Web应用

PhpStorm 40 & 50 部署本地Web应用

2. Double-click Defaults in the edit dialog box or the wrench button on the stand-alone toolbar to expand the setting items, or just click the plus sign on the left of Defaults (“+“) icon to expand the setting items. We choose PHP Web Application here. After selecting, the dialog box on the right will display the corresponding configuration information. As shown in the picture below

PhpStorm 40 & 50 部署本地Web应用

3. In the drop-down box of Server in the picture above, select the server to be used. The default is as shown. At this time, we need to choose to configure a Web server. Click the button behind Server to pop up the Server Configuration information. As shown in the picture:

PhpStorm 40 & 50 部署本地Web应用

  1. Click the plus sign on the upper left to add server information and display an unnamed server information. As shown below

PhpStorm 40 & 50 部署本地Web应用

My picture:

PhpStorm 40 & 50 部署本地Web应用

5. Configure the server information, (here I use the WampServer 2.2 integrated environment as the local server) change the Name to wamp, you can change it to anything you like Naming, it is best not to use Chinese. Fill in localhost or 127.0.0.1 in the Host column. If you use a remote server, fill in the server's IP address or domain name. Change Port (port number) to the port number of your server. The Debugger defaults to Xdebug, you can also select Zend Debugger through the following box. After configuring, click the OK button below to return to the application running/debugging dialog box.

PhpStorm 40 & 50 部署本地Web应用

My picture: (I use phpnow, so I named it like this)

PhpStorm 40 & 50 部署本地Web应用

6. Select the server you just configured in Server. and the relative path to the folder where you want to deploy the Web server. After the configuration is completed, click the OK button below to exit. As shown in the picture above
7. After the previous configuration is completed, the application cannot be deployed to the server immediately. Also configure the deployment directory of the project, etc. xSelect Tools-> Deployment-> Configuration to pop up the deployment configuration dialog box.

PhpStorm 40 & 50 部署本地Web应用

8. Also click the plus sign on the upper left to add deployment information, modify the deployment name (here to jQueryDemo) and select local mounted folder in Type, as shown in the figure

PhpStorm 40 & 50 部署本地Web应用

9. Select the path to the server

PhpStorm 40 & 50 部署本地Web应用

My picture:

PhpStorm 40 & 50 部署本地Web应用

10. Modify the mapping information, select and fill in the corresponding information. Select the Mappings tab. Local path is the path to the source file, which is the folder where the project is located. Deployment path on server is the relative path to the previously configured Web server. The configuration information is as shown in the figure below

PhpStorm 40 & 50 部署本地Web应用

My picture: (Pay special attention to pressing the Use this server as default button!)

PhpStorm 40 & 50 部署本地Web应用

10. At this point, the project can be deployed to the server for testing.

The deployment methods are as follows:

1. Select the menu Tools-> Deployment-> Automatic Upload. After selecting it, there will be a check mark in front of the menu item. At this time, as long as the page you edit can be maintained Automatically deploy files to the server.

PhpStorm 40 & 50 部署本地Web应用

2. Select the menu Tools-> Deployment-> Upload to jQueryDemo, so that all files will be deployed to the server.

PhpStorm 40 & 50 部署本地Web应用

3. Right-click on the selected item to open the shortcut menu, select Deployment-> Upload to jQueryDemo, so that all files are deployed to the server.

PhpStorm 40 & 50 部署本地Web应用

Note:

My source file directory is: F:php

The folder directory I deployed on the server is: F:Program FilesPHPnow-1.5.6htdocsdeployment

In addition:

After setting up the server , found that after adding files and then deleting them, the server will not delete them at the same time.

Check the following options in Setting-Deployment-Options.

PhpStorm 40 & 50 部署本地Web应用

The above introduces PhpStorm 40 & 50 to deploy local web applications, including web server and application content. I hope it will be helpful to friends who are interested in PHP tutorials.


Related labels:
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!