Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

How to display images which are outside root in popup

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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:
ankuj2004
New php-forum User
New php-forum User
 
Posts: 6
Joined: Wed Apr 24, 2013 6:41 am

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
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 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.
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.