PHP file isn't outputing to local browser, just showing code

269 views Asked by At

Originally, I would select my php files and it would open the site on my local browser, I accidently opened it to notepad and now it will only open the code to editors. Does anyone know how to change the file setting back to when it would execute in the local browser? Ive tried resetting the filetype associations and resetting the file extension settings in the registry editor. I am currently using Windows 11

1

There are 1 answers

1
Barış Can Altın On

If you are not using a servlet like wamp or xampp you cannot process the php file on localhost.As long as the files have a php extension and are in the target folder of the servlet, while the servlet is active (example: if there is an index.php in the www folder in wamp. It will work if you type localhost/index.php in the browser.) your php files will work.