How to display images which are outside root in popup

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

ankuj2004
New php-forum User
New php-forum User
Posts: 6
Joined: Wed Apr 24, 2013 6:41 am

How to display images which are outside root in popup

Postby ankuj2004 » Wed Apr 24, 2013 9:03 pm

I have been trying to display images in a popup window. The images are not in root directory. I have tried javascript window.open but it does not work. I tried writing a php script to which I pass the directory and image name and try to display it in another tab using hyperlink. But that page just displays garbage data.

I have been trying to solve this issue for 3 days but none of the solution seems to work.

Any help in this regard ? :help:

swarups
New php-forum User
New php-forum User
Posts: 20
Joined: Tue Mar 06, 2012 11:05 pm

Re: How to display images which are outside root in popup

Postby swarups » Thu Apr 25, 2013 5:41 am

Hi,

This can be a issue of image path. Please check whether you are giving the correct image path or not.

Thanks
Swarup

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm

Re: How to display images which are outside root in popup

Postby seandisanti » Thu Apr 25, 2013 7:32 am

use file_exists() and is_readable() to make sure that both are true for the image file to be displayed, if they're not, then verify paths and permissions.


Return to “PHP coding => General”

Who is online

Users browsing this forum: Google Feedfetcher and 2 guests

cron