Reputation: 151
LocalHost shows blank page. I changed port to 80 for Apache and when I press open page, it goes to localhost/mamp just fine. When I delete /mamp, all I get is a blank page. I've tried multiple things like shutting down mamp, starting it up, restarting my machine. I've checked my folder set-up and it's fine.
I tested it by creating a new file page index.html and it opens just fine.
I have no clue why it's not opening my index.php file. Here's my block of php code from header.php that I have.
<html>
<head>
<title><?php echo $pageTitle; ?></title>
<link rel="stylesheet" href="css/style.css" type="text/css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,700" type="text/css">
<link rel="shortcut icon" href="favicon.ico">
</head>
And here's my index.php
<?php
$pageTitle = "A store of unique t-shirts";
include('inc/header.php');
?>
Any help would be appreciated.
Upvotes: 0
Views: 467
Reputation: 3665
Anything between <head>
and </head>
shouldn't show up on the page, so maybe try adding some content that would be printed on the page. For example, you could change header.php
to this just to see if anything shows up:
<html>
<head>
<title><?php echo $pageTitle; ?></title>
<link rel="stylesheet" href="css/style.css" type="text/css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,700" type="text/css">
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<p>Hello, this is content.</p>
</body>
</html>
Upvotes: 0