natalieG Posted May 13, 2006 Share Posted May 13, 2006 We have this code to display an image in a Table of an HTML section of a php file.The image does not display, the browser showing the little square for a missing image. The imagefile is in the same directory as the source file.Thanks,Michelle<TD COLSPAN="2" WIDTH=<?php echo $TABLEWIDTH ?> ALIGN="center"><img src=<?php echo "title.jpg" ?>></td> Quote Link to comment Share on other sites More sharing options...
alpine Posted May 13, 2006 Share Posted May 13, 2006 you are missing some [!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--];[!--colorc--][/span][!--/colorc--] and it should give you a error msg when loading the php file, doesn't it? Also missing some double quotes in your src - [!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]"[!--colorc--][/span][!--/colorc--]<TD COLSPAN="2" WIDTH=[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]"[!--colorc--][/span][!--/colorc--]<?php echo $TABLEWIDTH[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--];[!--colorc--][/span][!--/colorc--] ?>[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]"[!--colorc--][/span][!--/colorc--] ALIGN="center"><img src=[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]"[!--colorc--][/span][!--/colorc--]<?php echo "title.jpg"[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--];[!--colorc--][/span][!--/colorc--] ?>[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]"[!--colorc--][/span][!--/colorc--]></td>i still cannot understand why you are echo'ing a hard coded img name, assume its just for this example code... Quote Link to comment Share on other sites More sharing options...
natalieG Posted May 13, 2006 Author Share Posted May 13, 2006 Thanks very much for the help. We have corrected our syntax a you reccomended, but the main issue was that the jpg file was corrupted. It is really strange, the image opened anddisplayed fine on Corel Photopaint, but in Adobe Goliove, the image icon indicated a torn image. we changed to another image file and everything is cool. Thanks againNatalie Quote Link to comment Share on other sites More sharing options...
natalieG Posted May 13, 2006 Author Share Posted May 13, 2006 The reason the image did not dosplay is that the image was in CMYK format before it wasastored as a JPEG. Corel will open that, but a browser will not. when we converted the imageto RGB color space, everything worked fine. I do not know why we did not get anb error messafe,except that we were openiong the file in PHPEdit and it may do as extensive a syntax check.Thanks againMelanie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.