When I open this php file, it does not load:
<?php
echo "I am awesome";
?>
<html>
<head> </head>
</html>
Error screenshot
However, if I remove the
<head>
tag, code works fine.
I've used both Xampp and Wamp servers on Windows PC, tried changing ports but the issue still persists.
Solved: Using http://127.0.0.1/test.php instead of http://localhost/test.php fixed the problem for me and code executed successfully.