Jump to content

Includes php file but doesnt read images


x_maras

Recommended Posts

Hi,

 

I'm working on a wordpress website and I made a wrapper in order to include php files.

In this php file there is a table and it has an image in some cells.

Unfortunately the images doesn't appear and instead of them appears the alt text.

 

There is no problem with the paths, I think, because I use some other pictures from the same folder

for background, but I do it in the css file.

 

I tried to put some images in the code but no image appears, only the alt.

eg

<?php
echo "	<div>
		here should appear:<br />
		<img src='images/available.png' alt='available' title='image_test' />
                        <br />
		but doesnt
	</div>";
?>

 

Something is wrong in the include I think, because I cant explain why the css reads the images and the html not.

 

I would really appreciate any advice!

 

Thank you in advance,

Dinos

no the images/available.png is a relative path from where the php file (the included one) is.

In the same folder is also the css file and I use the same path for the css too.

 

e.g

 

td.example {

background-image: url(images/example.png);

}

 

and this works.

 

After reading your post I tried a relative path from where the wrapper is but nothing.

 

I tried something like this before a couple of weeks with joomla and everything was working fine...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.