I am running XAMPP in order to use PHP on my local computer. I put all of my scripts inside of the htdocs folder (the default location). Everything used to work great until recently. For example, if I click on an HTML file in htdocs, the file opens up in a browser(like it should). But, if I click submit on a form with an action set to "some-script.php" It goes to the php page and displays the php code. Now, if I type into my browser "localhost/some-html.html" then it works? Why is that? What could I be doing wrong??
2
-
your Apache are not processing your PHP. Can be a lot of things. You recently installed XAMPP ? That's your OS ?João Mosmann– João Mosmann2012-07-27 00:29:12 +00:00Commented Jul 27, 2012 at 0:29
-
I have it installed for a while. I can get it to work if I hard type it into my browser. Windows 7Matt– Matt2012-07-27 00:34:11 +00:00Commented Jul 27, 2012 at 0:34
Add a comment
|
2 Answers
When you access it by typing "localhost/some-html.html" into the address bar you use XAMPP's server and PHP engine to access the page, when you simply double click the file in the folder you are just opening the file with the default program (which happens to be your browser)
1 Comment
dano
XAMPP's PHP engine is what actually runs the php code before sending the result to the browser