|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
wap, do you mean you want to upload the selected file from the form to your web server?
|
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > gd library show image |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|