Click to See Complete Forum and Search --> : file inc


faamugol
10-18-2004, 03:50 PM
Hi,

I want know if it is possible to include

the tag <img src= "photo.jpeg"> in a include file in PHP

I have tried the following but I dont get my picture on the page:

header.inc

<TR>
<TD align=middle><img src= "photo.jpeg"></TD>
<TD align=middle>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp</TD>
<TD colspan=2 align="middle"><FONT face=Verdana
color=purple><STRONG><B>RECOGUI</B></STRONG></FONT></TD>
</TR>

index.php

<?php
........
include("header.inc")

.......
?>



thank you in advance for any idea.

Jona
10-18-2004, 03:57 PM
What is the HTML output, or is there none? Make sure your file permissions permit the file inclusion. Put the following line at the beginning of your PHP file to get any and all of the possible problems with your script that would cause it to react abnormally:


<?php
error_reporting(E_STRICT | E_ALL);
?>

pyro
10-18-2004, 05:05 PM
Is the path to the image correct?

faamugol
10-19-2004, 12:38 AM
Thank you Jona, Pyro for your answers..

the path to the image is correct..
I have tried to use the GIF format and I get the image on the page.

But when use the other formats: JPEG,JPG, PNG, BMP, ....
I juste see a cross instead of my image. So others formats are not working. What can cause this probleme?

thank you in advance for your helpful reaction.

LiLcRaZyFuZzY
10-19-2004, 11:54 AM
what browser are u using?

faamugol
10-19-2004, 03:38 PM
thank you LiLcRaZyFuZzY and all other

I'm using Internet Explorer 6.0

and it supports only the GIF files..

any help?

Jona
10-19-2004, 04:03 PM
Did you just give the image a different extension or did you actually save and view the JPG file? Make sure the file works.

faamugol
10-19-2004, 04:10 PM
thank you jona for your answer.

I had a JPEG file and I use the Paint to open it and save it as GIF, PNG, PMP..so I get four different files with the above exentions

But when i try to view them in Internet explorer 6.0 , only the GIF is supported. For the extensions: JPEG, PNG, BMP, I have juste a cross instead of the picture...

thank you in advance for any help

Jona
10-19-2004, 04:12 PM
You mean the actual images themselves don't show up? Like when you type the address www.site.com/image.jpg -- that doesn't show up?

faamugol
10-20-2004, 10:03 AM
Thank you jona

that is what i mean.

browser doesn't show up http://www.mysite.com/image.jpeg


any help please

Jona
10-20-2004, 10:05 AM
Do you have any specific settings anywhere that would restrict that file type? Maybe hotlinking is disabled, or the server for some reason thinks it's a different encoding type?

pyro
10-20-2004, 10:13 AM
Do you have a link to the page in question?

faamugol
10-20-2004, 02:49 PM
thank you Pyro,Jona for your answer..

I dont have any linkt to the page

On the home page of my site, I have a link: show memeber

After clicking on this link, I go to the page

show.php . On this page I display informations(including photo) relatives to the members stored in the mysql DB.

But , I get only displayed the GIF file.

LiLcRaZyFuZzY
10-21-2004, 11:44 AM
maybe you could give us the url anyway?

faamugol
10-21-2004, 04:11 PM
thank you for all the answers..
here is my url

<TD align=middle><img src= "<?php echo picture1.jpeg"; ?>></TD>


I use picture1.gif, I get the image displayed on the browser, so only when the extension is GIF

thank you in advance

Jona
10-21-2004, 04:22 PM
Use quotes around your echo statement.


<?php echo "image1.jpeg"; ?>

faamugol
10-22-2004, 08:31 AM
Thank you jona i have tried it but still dont get the job done..

meanwhile the following piece of html works good for any kind of image.



<HTML>
<BODY>
<img src = "thierno.jpg">
</BODY>
</HTML>


I dont know more...

Scleppel
10-22-2004, 09:26 AM
the file might be .JPEG instead of .jpeg ?
just a thought