How to configure local server on PhpStorm?

I use PhpStorm 2018.03

I tried so many time but I can not configure the local server on PhpStorm.

Local of my project: D:\TestPHPStorm

I installed xampp in the disk D, the port is at default 80.

 

When I open it with the built-in server, the FireFox open at http://localhost:63342/TestPHPStorm/hello.php?_ijt=nif5i25q5ai0imfnudkrppou0n

And the result “Hello, Word!” is on the screen.

But when I try to open this test.php  with FireFox through the local server, it not work after many time of my different ways. The results are always as the picture 4. I hope to get some advice. I thank you so much.

 

Pic 1

Pic 2

Pic 3

 

Pic 4

1 comment

At Pic 2, the server doesn't seem to be default - the font would've been bold if it was. Please click the button again to make the server default.

At Pic 3, Deployment path is the path relative to Folder on the Connection tab you want to place your project files to. The way you set it, the project will be uploaded to the web root itself. It seems to be the desired behavior in your case, so just replace the backward slash \ with the forward one / (it doesn't matter much, but still).

After you do that, you can run Deployment | Upload to... from the context menu on your project root, it should upload the files. These files should become accessible via the web server after that.

Please note you can automate the uploading process at Settings | Build, Execution, Deployment | Deployment | Options | Upload changed files automatically.

0

Please sign in to leave a comment.