I used to open any php file but now it doesn't.
I have been using Appserv for a while, and I have to start appache and then open the file.
This is how I used to open a php file on web browser
C:\AppServ\www\myfile.php
Am I missing something?
Asked
Active
Viewed 90 times
-2

jafar jafari
- 9
- 1
-
1Make sure that your apache server is running and then open the browser and write: http://localhost/myfile.php then hit enter. – Hardood May 06 '20 at 21:40
-
Check if everything is still running, specially webserver, everything shold run as as a service – nbk May 06 '20 at 21:40
-
Well I ran everything again, like appache and mysql. And what I get is bunch of codes. – jafar jafari May 07 '20 at 05:58
-
file:///C:/AppServ/www/wordpress/wp-config-sample.php this is what wordpress says i have to write in URL to setup wordpress but it shows the codes.. I have plugins installed, did many things a year ago – jafar jafari May 07 '20 at 06:08
1 Answers
0
You can't run PHP in a web browser.
For web programming, PHP is used as a server-side language.
You need to configure a web server to execute it, and then request the URL for the PHP program with the browser.

Quentin
- 914,110
- 126
- 1,211
- 1,335
-
It used to show, and now even I am trying to run wordpress which again what I used to do, I get bunch of codes, it shows html and css as codes. – jafar jafari May 07 '20 at 06:00