Executing PHP code in a browser using PHPstorm

So PHPstorm works fine with php code in the console when I click run, which is very good, but I want to see it in the browser.

So, I created a new PHP application inside PHPstorm, configured the server on "localhost: 8000".

PHPstorm screenie

Now, when I press RUN, it opens the browser, but the error message appears: "Unfortunately, Google Chrome could not connect to localhost: 8000"

What am I doing wrong?

Thank!

+5
source share
1 answer

You must first configure the launch configuration for your project.

Go to Run -> Edit Configurations, click "Embedded PHP Web Server", and then click "+". You should see something like this:

Run / Debug Configurations

- Run -> Run '<project-name>'. .

+1

All Articles