How do you view an php file? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do you view an php file?

I thought php was apart of html, but it won't open the file. All it does is open my file in my code editor. I am so confused. What do I do?

25th Jan 2021, 1:27 AM
GeoneveStudios
GeoneveStudios - avatar
3 Answers
+ 2
C91AOP You can open it in notepad++ editor also.
25th Jan 2021, 3:12 AM
A͢J
A͢J - avatar
+ 2
You need to install a server which can execute you php file For me the easiest is an apche server You can install xamp/wamp server in your pc and store all you code in htdocs folder Inside htdocs folder create a new folder with the name of your project and move all your code there Now you can go to any browser and write an url localhost/<your foldername>/ this will execute your php file Where can you find the htdocs folder? When you have completed the installation then type for htdocs after pressing the windows key. Open the first result names htdocs. Happy coding ~ Krish
25th Jan 2021, 4:24 AM
Krish
Krish - avatar
+ 1
Via an editor. A browser will not show back end code.
25th Jan 2021, 3:29 AM
Sonic
Sonic - avatar