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
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
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:
Click the plus sign on the upper left to add server information and display an unnamed server information. As shown below
My picture:
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.
My picture: (I use phpnow, so I named it like this)
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.
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
9. Select the path to the server
My picture:
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
My picture: (Pay special attention to pressing the Use this server as default button!)
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.
2. Select the menu Tools-> Deployment-> Upload to jQueryDemo, so that all files will be deployed to the server.
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.
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.
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.