class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I use a script to show images. I can upload images fine but when I try to show them I get an error message. I don't do any processing to the image. I just need to pull from the server and show on a web page.
The code to output local image
$img = new upload($imgurl);
header('Content-type: ' . $img->file_src_mime);
echo $img->Process();
Log system information - class version : 0.29 - operating system : FreeBSD - PHP version : 4.4.9 - GD version : 2.0.28 - supported image types : png jpg gif bmp - open_basedir : no restriction - language : en_GB source is a local file /home/lifespa/uploads/pics/11_svclogo_226116.jpg - local file name OK determining MIME type - Checking MIME type with Fileinfo PECL extension Fileinfo PECL extension not available - Checking MIME type with UNIX file() command MIME type detected as image/jpeg by UNIX file() command - MIME validated as image/jpeg source variables - You can use all these before calling process() file_src_name : 11_svclogo_226116.jpg file_src_name_body : 11_svclogo_226116 file_src_name_ext : jpg file_src_pathname : /home/lifespa/uploads/pics/11_svclogo_226116.jpg file_src_mime : image/jpeg file_src_size : 4909 (max= 52428800) file_src_error : 0 - source file is an image image_src_x : 150 image_src_y : 137 image_src_pixels : 20550 image_src_type : jpg image_src_bits : 8
Please let me know what I can do to get the images to show.
I use a script to show images. I can upload images fine but when I try to show them I get an error message. I don't do any processing to the image. I just need to pull from the server and show on a web page.
The code to output local image
Log
system information
- class version : 0.29
- operating system : FreeBSD
- PHP version : 4.4.9
- GD version : 2.0.28
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : en_GB
source is a local file /home/lifespa/uploads/pics/11_svclogo_226116.jpg
- local file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
Fileinfo PECL extension not available
- Checking MIME type with UNIX file() command
MIME type detected as image/jpeg by UNIX file() command
- MIME validated as image/jpeg
source variables
- You can use all these before calling process()
file_src_name : 11_svclogo_226116.jpg
file_src_name_body : 11_svclogo_226116
file_src_name_ext : jpg
file_src_pathname : /home/lifespa/uploads/pics/11_svclogo_226116.jpg
file_src_mime : image/jpeg
file_src_size : 4909 (max= 52428800)
file_src_error : 0
- source file is an image
image_src_x : 150
image_src_y : 137
image_src_pixels : 20550
image_src_type : jpg
image_src_bits : 8
Please let me know what I can do to get the images to show.
Thanks
Kim Carr