PHP not running

0 Gary Miller · September 2, 2014
I am very new to programming. I downloaded xampp and tried to run php. At first i didn't save the files in htdocs, then I realized you have to. Once I did that i had the same problem. Whenever I launch in chrome or other browsers the code doesn't run. It is just displayed like it would be in a text editor. Please help. I'm sure it is a simple rookie mistake. 

Post a Reply


Oldest  Newest  Rating
+2 Franz Schmidt · September 2, 2014
Did you activate Apache on XAMPP. This is needed to run php code.

+1 Ibrahim Tuzlak · September 2, 2014

It is just displayed like it would be in a text editor.

Are you sure you are entering the following URL:


EDIT: As far as I know, the PHP file would be shows as text if it is opened in a form of
and not localhost, as c:\... is not the right way to run it.
+1 Otto Fekonja · September 2, 2014
how do you open files/code? do you click on file? if you do, and want to lunch in chrome, it must be saved in .html format.

but if you using wamp/xamp you must type localhost in url bar of your browser, then navigate to you source folder where your project is smth like this..

0 Gary Miller · September 3, 2014
Thank you guys! I wasn't opening the file right. Once i typed in localhost/filename/filename it worked! So thankful for Buckysroom
  • 1



Server-side, HTML embedded scripting language used to create dynamic Web pages.