How to configure phpstorm server

爱喝马黛茶的安东尼
Release: 2019-08-19 11:09:37
Original
3737 people have browsed it

How to configure phpstorm server

The server I use is Apache. In fact, the operations on all servers are the same. In specific applications, there are three situations:

(1) The server is installed on the local computer, and the source files of our project are located in the file directory of the server, that is, the /htdocs directory.

(2) The server is installed on the local computer. The source files of our project are in other folders on the computer. The project files need to be transferred to the file directory of the server for verification.

(3) The server is not on the local computer. Our project source files are on the local computer. The project files are transferred to the file directory of the server through FTP, SFTP, FTPS or LAN.

Later in this article we will call them: Application 1, Application 2, Application 3.

The first step is to open the dialog box shown in the figure below through Files|Settings|Deployment.

How to configure phpstorm server

Click the green plus sign and the following dialog box will appear.

How to configure phpstorm server

The name here can be chosen casually. For example, I named it "Apache". The selection of the "Type" option below is based on our application type. If it is application 1 , select "In place"; if it is application 2, select "Local or mounted folder"; if it is application 3, select according to your own file transfer method. Depending on the selection, the interface that appears later will be different. Of course, modifications can still be made in the next interface.

Related recommendations: "PhpStorm Usage Tutorial"

The second step, if "Type" in the previous step selects "Local or mounted folder", then there will be the following dialog box appears.

How to configure phpstorm server

As you can see, there are three tab areas to fill in: "Connection", "Mapping", and "Excluded Paths". When the selected "Type" is different, only the "Connection" part will be different. If the "Type" is "In place", then only the "Web server root URL" needs to be filled in. "Web server root URL", as the name suggests, is the root URL of the web server. If we have configured the domain name of the server in the hosts file, then the configured domain name can be written here.

Then what needs to be filled in is the "Upload/download project files" section. First understand the concepts of Upload and Download.

Upload is copying data from the project TO the server, either local or remote. 
Download is copying data FROM the server to the project.
Copy after login

In other words, since the "Type" we selected is "Local or mounted folder" (i.e. Application 2), the project files need to be transferred to the server root file directory, so "Upload/download project files" What needs to be filled in is which directory we want to transfer the project to. Generally, we just fill in the /htdocs directory of the server.

In the third step, we have already filled in the "Connection" part in the previous step, and the next step is the "Mapping" part, as shown in the figure below:

How to configure phpstorm server "Local path": refers to is the current directory of our project, which will be automatically generated and does not need to be filled in by us.

“Deployment path on server ‘Apache’”: This is essentially a requirement to specify a more detailed “Upload/download project files” directory. Generally, a folder with the same name as the project file is most convenient.

“Web path on server ‘Apache’”: refers to the directory of the homepage php/html file.

The configuration work is completed here.

The fourth step is to upload the project to the web server as shown in the figure below. After uploading, we will see a copy of the current project in the specified directory of the server.

How to configure phpstorm server##

The above is the detailed content of How to configure phpstorm server. For more information, please follow other related articles on the PHP Chinese website!

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