Broken images - displaying with dreaded red x
Posted: Tue Mar 23, 2010 10:05 am
Like my id says....really new at this. My page is created with several "require"s. I bring in the header image from one php file, the navigation from another php file. The "required" file displays the images correctly. But, in the generated page, a red x is displayed where the images should be (but the alt text is displayed). As you can see I have used both relative and absolute paths with no luck. Here is the code for the generated page where the images do not display:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
//$page_title = "Home";
$page_title = "Home";
?>
<title>
<?php
print $page_title;
?>
</title>
</head>
<body>
<?php
require_once("core/page_header.php");
require_once("c:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/my_starz/core/nav_menu.php");
?>
</body>
</html>
Here is the code from header.php which displays the header image correctly:
<div class="topOfpage" ><img src="../_img/header_imgs/header_img.gif" alt="Different Starz" name="imgHeader" width="800" height="169" border="0" usemap="#imgHeaderMap" id="imgHeader" />
<!--is map--->
<map name="imgHeaderMap" id="imgHeaderMap">
<area shape="rect" coords="715,138,778,166" href="../site/login/index.php" alt="Log In" />
</map>
</div>
Thanks for suggestions/corrections!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
//$page_title = "Home";
$page_title = "Home";
?>
<title>
<?php
print $page_title;
?>
</title>
</head>
<body>
<?php
require_once("core/page_header.php");
require_once("c:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/my_starz/core/nav_menu.php");
?>
</body>
</html>
Here is the code from header.php which displays the header image correctly:
<div class="topOfpage" ><img src="../_img/header_imgs/header_img.gif" alt="Different Starz" name="imgHeader" width="800" height="169" border="0" usemap="#imgHeaderMap" id="imgHeader" />
<!--is map--->
<map name="imgHeaderMap" id="imgHeaderMap">
<area shape="rect" coords="715,138,778,166" href="../site/login/index.php" alt="Log In" />
</map>
</div>
Thanks for suggestions/corrections!