1

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
  • You have to put your scripts within www folder. Commented Apr 1, 2011 at 23:15

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

1 Comment

@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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.