user460847
user460847

Reputation: 1618

XAMPP: can't get PHP to work

I saved a .php file to file:///C:/xampp/htdocs/tester/tester.php, and though my XHTML and CSS are working, my PHP is not. I put

<?php phpinfo(); ?>

as the first line of the body, and

<?php
echo "<p>Hello World</p>";
?>

a couple of paragraphs in. But when I view the page, nothing for phpinfo() shows up at all, and the Hello World bit shows up as:

Hello World"; ?>

Apache and MySQL are running. I've scoured the internet and can't find a solution, but I feel like it's probably something very basic that I'm missing.

Upvotes: 1

Views: 1789

Answers (1)

DuKes0mE
DuKes0mE

Reputation: 1131

Try to call your file with

localhost/tester/tester.php

instead of file:///C:/xampp/htdocs/tester/tester.php.

Upvotes: 1

Related Questions