When I try to open a .php script from my hard drive while WAMP is running my browser displays the content of the script (not the output). I don't have a whole lot of experience with MySQL or PHP...so what can I do to troubleshoot?
1 Answer
Make sure you're accessing it through the web server: http://localhost/web/path/to/file.php
.. rather than opening it as a local file: file:///local/path/to/file.php
1 Comment
jrn.ak
@A.J.: It's important to note that the php script is only parsed as PHP when the server is sending the file. Opening it directly completely bypasses the server, and your browser just sees it as text.