Jump to content

viewing a image from other folders


tecmeister

Recommended Posts

Hi Guys,

 

I'm having trouble viewing an image from a folder that is not in the same main directory.  When I try and view it in the same main directory it is fine.

 

<img src="<?php echo "../../".$data['imagePath'];?>" width="210px" height="auto" />

 

I have tried viewing the image not using php and it still has the same problem.

 

<img src="../../Images/profile_image/tecmeister/n509028508_2928.jpg" width="210px" height="auto" />

 

I've also looked at the permission of the folder and it is fine.

Link to comment
https://forums.phpfreaks.com/topic/181532-viewing-a-image-from-other-folders/
Share on other sites

So it's like, commondir/Images/profile_image/tecmeister/someimage..

 

and trying to include it from commondir/update/_INCLUDE/main.php ?

 

If so something like this should work:

 

<img src="../../../<?php echo $data['imagePath'];?>" width="210px" height="auto" />

 

../ goes up one directory.

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.