PHP using HTML editor - Post ID 250663

User 2194035 Photo


Registered User
7 posts

I have been building a web page for my wife's business using coffeecup software. The top element (logo) on each page is a png image. Everything worked well in the original html version of the page and later with the php version of the same page. I am converting to php so i can use php to "require" duplicate elements on each page (logo, footer, navigation, etc.). I had to stop work on the page for several months and when I resumed work on the php version of the page, the png images did not appear properly - they appeared as small squares.

I tried converting them to jpg images but the problem remained.

I'm using PHP 5.4.3 (64-bit version) and Apache httpd, both provided in a WAMP package. Any clue as to why what used to work doesn't anymore? What do I do to fix it?

Thanks in advance.
User 187934 Photo


Senior Advisor
20,181 posts

Sounds like your images aren't located in the correct location or possibly your images are .PNG instead of .png.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2194035 Photo


Registered User
7 posts

The HTML version of the file works fine which seems to indicate file location isn't a problem.
I tried using my jpg version of the image. Again HTML works, PHP doesn't.
I tried both upper case and lower case "png" both in the file name and in the code. Again HTML works in all cases, PHP does not.

The code I use to display the image in both files is:

<img id="logop" src="headerpics/abb-heading-1d.png" title="logop" alt="">
User 187934 Photo


Senior Advisor
20,181 posts

Is there any errors showing on the server?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2194035 Photo


Registered User
7 posts

No errors being shown. I'm running this on my laptop with the standard "http://localhost/.../index.php".
User 187934 Photo


Senior Advisor
20,181 posts

Are you using the iframe script the form builder provides?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2194035 Photo


Registered User
7 posts

Not using any iframe script. Don't have form builder.
User 187934 Photo


Senior Advisor
20,181 posts

Are you using a host or are you going to stay with WAMP?
You can adjust your server to sparse php inside html with an adjustment to your .htaccess file.
Can we see example code of your page that your having problems with?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2194035 Photo


Registered User
7 posts

Here's the PHP code. The sidebar contents are just generic filler text. Main contents of page is an image carousel. The images in the carousel also don't show in the PHP version, but show up fine in the HTML version of the page

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="generator" content="Bluefish 1.0.7">
<!--<meta name="created" content="Mon, 25 Apr 2011 22:59:40 GMT">-->
<meta name="description" content="">
<meta name="keywords" content="">

<title>Ashley Brook Bridal</title>

<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->

<?php require 'templates/style.html' ; ?>



</head>

<!-- /*
body
container (contains header image)
center
ul (menu-menu)
navi
content
sidebar
footer
*/ -->

<body >
<div id="container">
<iframe><src="headerpics/abb-heading-1d.jpg"></iframe>

<div id="center">


<?php require 'templates/menu.html' ; ?>



<!-- REST OF BODY CONTENT BELOW HERE -->


</div><!-- end div center -->

<div id="content">

<p class="top"><b>Welcome To Ashley Brook Bridal</b></p>

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="520" height="479" id="CC1043122" align="middle">
<param name="movie" value="abbalbum3.swf"/>
<param name="quality" value="high" />
<param name="FlashVars" VALUE="xmlfile=abbalbum3.xml"/>
<param name="scale" value="noscale" />
<param name="salign" value="lt" />
<param name="bgcolor" value="#ffffff" />
<param name="wmode" value="transparent" />
<embed src="abbalbum3.swf" quality="high" bgcolor="#ffffff" width="520" height="479"
name="CC1043122" wmode="transparent" scale="noscale" salign="lt" align="middle" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>


<p> <b><span>A</span>shley Brook Bridal</b> meets the needs of plus
size women in the selection of elegant, affordable gowns for wedding,
proms and other special occasions. </p>
<p> Unlike most bridal salons which carry only a limited number of
plus-size gowns, <b><em>Ashley Brook Bridal</em></b> caters <i>specifically</i>
to the needs of full-figured women. </p>

</div><!-- end content -->

<div id="sidebar">
<p class="top"> sidebar </p>
<p> Sometimes this would be called a <em>sidebar</em>, but it doesn't
always have to be on the side to be called a <em>sidebar</em>.
Sidebars can be on tops of things, below things, but they are usually
beside things – hence it being a called a sidebar. </p>
<p> <small>Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, </small> </p>
</div><!-- end sidebar -->

<?php require 'templates/footer.html' ; ?>

</div><!-- end div container -->
</body>
</html>
User 187934 Photo


Senior Advisor
20,181 posts

I would take a close look at this.
<iframe><src="headerpics/abb-heading-1d.jpg"></iframe>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.