问题
I've installed XAMPP on a 32-bit windows xp machine. Their splash page at localhost looks fine, but i can't get my own php echo tests to run. They only display the code, not the page itself. I've tried putting my files in different places in their directory hoping something will work. I've also tried other free servers with no luck, but have since removed them. Where(?) is localhost on my machine? any help greatly appreciated, thanks.
回答1:
XAMPP usually stores the web-accessible files in an htdocs
folder. Find this and prepend http://localhost/
where local/path/to/htdocs
would be, and if XAMPP is running, it should work.
So a file (in Windows) named and found in c:\xampp\htdocs\test.php
would be http://localhost/test.php
.
See: http://www.apachefriends.org/en/faq-xampp-windows.html#startpage
来源:https://stackoverflow.com/questions/7135381/xampp-wont-run-php