Jump to content
Stef's Coding Community

broken image when include used


Recommended Posts

broms_page.php

 

 

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">'>http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

</head>

 

<body>

<h3>Brom's Page</h3>

 

 

<img src="images/Urban Blank Billboards/Stock Vector - Urban Blank Billboards/Urban_ Blank_ Billboards1.jpg" />

<?php

@include("banner.php");

 

print "<br><br>";

 

?>

 

</body>

</html>

 

 

 

 

banner_inc.php

 

<img src="bromssite/images/Urban Blank Billboards/Stock Vector - Urban Blank Billboards/Urban_ Blank_ Billboards1.jpgweb">

 

 

 

 

<?php

 

$zeus_password = "great";

 

?>

</p>

<p> </p>

 

 

 

when viewed it is broken image

 

 

probably really easy

 

or just overlooked

 

 

put any help would be good

 

 

 

source code

 

 

 

 

<!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" />

<title>Untitled Document</title>

</head>

 

<body>

<h3>Brom's Page</h3>

 

 

<img src="images/Urban Blank Billboards/Stock Vector - Urban Blank Billboards/Urban_ Blank_ Billboards1.jpg" />

<br><br>

</body>

</html>

 

 

thanks in advance!

Edited by talos
Link to post
Share on other sites

It would be easier to figure out if you post a link to your page, but my guess is that it's a path issue.

 

@include("banner.php");

 

Maybe you need to use something like ./banner.php (the . tells it to look one directory up for the image). Or use the full path. ??

Link to post
Share on other sites

have linked the image back dirctly to its source and even put a copy of the folder in pear and no joy, instead of a broken image it shows a holding image with a little image picy in top left....

 

 

why do the easy things torment me!!!

 

 

i am just going to run head first into a wall to see if it helps any ha!

post-32686-022169700 1300800207_thumb.gif

Link to post
Share on other sites

Perhaps you can be a bit more clear: which image are you having trouble with? There is one image in "broms_page.php" and one within the include. Also, for future reference, try to avoid spaces in your folder names. The simpler your folder names, the better (and the less issues you'll have.)

 

banner_inc.php

<img src="bromssite/images/Urban Blank Billboards/Stock Vector - Urban Blank Billboards/Urban_ Blank_ Billboards1.jpgweb">

 

Just thought I'd point out: ".jpgweb". That isn't causing the error, is it?

 

Also, maybe this is just me being confused, but your include calls "banner.php" but your actual include file is called "banner_inc.php"? Those two should be named the same, correct? Based on your rendered source code, it appears that your include file isn't being included, probably due to the naming issue I pointed out.

Link to post
Share on other sites

I always found it easier and more trustworthy to use the full link to the image, that way it works regardless of what level it is at when the image is on every page in the site like a banner.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...