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??
Share
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)