I can't find a way to run php on Visual studio code, Does anyone know how?
Duplicate:
Yes it is but a little bit different from here.
Steps:
I followed below steps to configure php in VS Code.
- Configure PHP linting in user settings
- Install Php Debug extension in VSCode
- Then configure php.ini file
- Create a external php file in root folder
- add
<? echo "My First PHP site in VSCode."; ?>
in external php file which I created now - In my index.html file I referenced my php file like:
- Run my web server apache using xampp control panel
- Build my project and run it on web browser it shows me nothing.
- Also when I open dev tools of my chrome browser its shows me my php code of index file commented. why? I don't know.
Question:
What I am doing wrong in my above steps to configure php in vs code. Please explain me in easy steps so I can easily achieve my goal. Thanks in advance.