To run live PHP code with VS Code Live Server Extension, you can watch the video given below or follow the steps given below the video:
Step 1 – Install Live Server Extension in VS Code
In the extensions tab of vs code, search for “Live Server”, then install the “Live Server” extension developed by “Ritwick Dey” as shown in the image below.
Step 2 – Install Live Server Web Extension in your Web Browser
Step 3 – Start VS Code Live Server Extension & Setup Web Extension
Then you simply need to start VS Code Live Server and then come to the browser for some setup in Live Server Web Extension.
- Click on the “Live Server Web Extension” icon shown in the right side of URL bar of web browser.
- A dialogue box will appear, then turn on “Live Load”.
- In the “live server address” input field, write the IP address and port number on which VS Code live server is running.
- In the “actual server address” input field, write the directory path of PHP file which you want to run live.
Step 4 – In a new tab, open the php files directory
All done! Leave a comment if this blog was useful.