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
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.

Link to comment
Share on other sites

Explain your directory structure better then.. I really don't know what you meant. Using -> To explain directory structure doesn't really make sense, and does _INCLUDE signify an include, or a directory name?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.