However, if you go to the php server address (localhost:3000/) the php pages worked for me and pressing ctrl+s to save updated the page correctly. It still brings up the directory structure and I think the issue lies with live server not being in the working directory of the php server, if that makes sense. I couldn't figure out how to get it to open the php server address rather than the live server address when pressing "go live". 2 Answers Sorted by: 40 EDIT: You will want to launch the server with the command php -S 0.0.0. In my settings.json I had "" set to true, but setting it to false didn't make a difference for me for some reason. Basically, the computer is talking to itself when you call the local host. Localhost server simulates a similar environment to compile & debug, in order to develop the code, just the same as in the real-time environment. For the actual server address put in your php server address (for me the default was and for live server address type in if you kept the live server default address and port. In this article, we will see how to use the Localhost server to run the PHP code. With php server and live server installed, go to the web extension for live server and check "I don't want a proxy setup". I was having a similar issue and I think I have found a workaround. When you edit and save the index.php file with the running VS Code, it will automatically updated on that IP address. you will see that it is working in a live server with a dynamic webpage like PHP.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |