General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old April 4th, 2003, 08:07 AM
wap wap is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 20 wap User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
gd library show image

I have an image upload form which uploads photos outside of the root directory to stop people accessing them. I've just installed gd library 2.0 and am struggling to understand how to show an image on screen.

Let's say have have a jpg image in the following folder

c:/images/photo1.jpg

How do i go about displaying photo1.jpg with php and gd library. I'd like the image on a seperate page and called like so

<img src="image.php?photo=photo1" >

Where image.php is the script i want to get the image.

I want to show the image in whatever size it has been uploaded at.

I'm using my test server which is using apache - php 4.3.1 on windows me os.

Thanks for your time and hope someone can help.

Reply With Quote
  #2  
Old April 5th, 2003, 06:42 AM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
wap, do you mean you want to upload the selected file from the form to your web server?

Reply With Quote
  #3  
Old April 5th, 2003, 10:56 AM
wap wap is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 20 wap User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No sorry, I already have the upload script sorted and working fine. The jpg photos get uploaded to a directory outside of root directory for security. I want to use php and gd library to get a selected image from this folder outside of root (ie get image from c:/images/photo1.jpg) and display it and am having trouble figuring it out. I don't want any resize or other manipulation of the image done and don't want to lose any image quality as the photos are required for printing id cards. Thanks Ben. hope you can help.

Last edited by wap : April 5th, 2003 at 11:00 AM.

Reply With Quote
  #4  
Old April 5th, 2003, 09:49 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
to do that you must enable php or apache to access documents outside the document root, which is actually a very big security risk.

Its better to store the images in a database if you want security.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > gd library show image


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway