Re: [PHP] [Newman] Passing an image through a php file.
On Thu, 2003-06-19 at 20:19, Mark Tehara wrote: ?php $myimage=..//..//site//images//2.jpg; header(Content-type: image/jpeg); fopen ($myimage, r); readfile($myimage) ; fclose($myimage); ? This seemed to do the trick for me. Thank you. / Mark Even better, you don't even need the fopen() and fclose() calls; readfile() is doing this with just the filename. http://www.php.net/readfile -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newman] Passing an image through a php file.
Ahh, the Docs don't tell you that. They are a little weard wehen it comes to that - Original Message - From: Lars Torben Wilson [EMAIL PROTECTED] To: Mark Tehara [EMAIL PROTECTED] Cc: PHP [EMAIL PROTECTED] Sent: Friday, June 20, 2003 10:53 PM Subject: Re: [PHP] [Newman] Passing an image through a php file. On Thu, 2003-06-19 at 20:19, Mark Tehara wrote: ?php $myimage=..//..//site//images//2.jpg; header(Content-type: image/jpeg); fopen ($myimage, r); readfile($myimage) ; fclose($myimage); ? This seemed to do the trick for me. Thank you. / Mark Even better, you don't even need the fopen() and fclose() calls; readfile() is doing this with just the filename. http://www.php.net/readfile -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newman] Passing an image through a php file.
On Fri, 2003-06-20 at 12:07, Mark Tehara wrote: Ahh, the Docs don't tell you that. They are a little weard wehen it comes to that How so? int readfile ( string filename [, bool use_include_path [, resource context]]) It does say 'filename', not 'resource'. Seems pretty unequivocal. However, if there is something wrong with the presentation or if you have suggestions for improvements, I can take a look at it for you. -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Newman] Passing an image through a php file.
I would like to pass an image throught http://server/newman/ImageTEST/image.php 1. I need the headers (Assuming) ? header(Content-type: image/jpeg); ? would make the computer think its a image file. 2. load the image using fopen (d://crushme//images//1.jpg, r); ?php header(Content-type: image/jpeg); fopen (d://crushme//images//1.jpg, r); ? The image http://server/newman/ImageTEST/image.php; cannot be displayed, because it contains errors. This returns this error (above) Yes 1. Image is in the right location. Yes 2. I'm stuck. Any Suggestions would be very good. / Mark /
Re: [PHP] [Newman] Passing an image through a php file.
try this: ?php header(Content-type: image/jpeg); fopen (d:/crushme/images/1.jpg, r); ? - Original Message - From: Mark Tehara [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Thursday, June 19, 2003 10:58 AM Subject: [PHP] [Newman] Passing an image through a php file. I would like to pass an image throught http://server/newman/ImageTEST/image.php 1. I need the headers (Assuming) ? header(Content-type: image/jpeg); ? would make the computer think its a image file. 2. load the image using fopen (d://crushme//images//1.jpg, r); ?php header(Content-type: image/jpeg); fopen (d://crushme//images//1.jpg, r); ? The image http://server/newman/ImageTEST/image.php; cannot be displayed, because it contains errors. This returns this error (above) Yes 1. Image is in the right location. Yes 2. I'm stuck. Any Suggestions would be very good. / Mark / -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newman] Passing an image through a php file.
try this: ?php header(Content-type: image/jpeg); fopen (d:/crushme/images/1.jpg, r); Just my opinion, but maybe you should try reading the file and echoing the data instead of just opening it. :) ---John Holmes... I would like to pass an image throught http://server/newman/ImageTEST/image.php 1. I need the headers (Assuming) ? header(Content-type: image/jpeg); ? would make the computer think its a image file. 2. load the image using fopen (d://crushme//images//1.jpg, r); ?php header(Content-type: image/jpeg); fopen (d://crushme//images//1.jpg, r); ? The image http://server/newman/ImageTEST/image.php; cannot be displayed, because it contains errors. This returns this error (above) Yes 1. Image is in the right location. Yes 2. I'm stuck. Any Suggestions would be very good. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newman] Passing an image through a php file.
?php $myimage=..//..//site//images//2.jpg; header(Content-type: image/jpeg); fopen ($myimage, r); readfile($myimage) ; fclose($myimage); ? This seemed to do the trick for me. Thank you. / Mark - Original Message - From: CPT John W. Holmes [EMAIL PROTECTED] To: Awlad Hussain [EMAIL PROTECTED]; Mark Tehara [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Sent: Friday, June 20, 2003 1:14 AM Subject: Re: [PHP] [Newman] Passing an image through a php file. try this: ?php header(Content-type: image/jpeg); fopen (d:/crushme/images/1.jpg, r); Just my opinion, but maybe you should try reading the file and echoing the data instead of just opening it. :) ---John Holmes... I would like to pass an image throught http://server/newman/ImageTEST/image.php 1. I need the headers (Assuming) ? header(Content-type: image/jpeg); ? would make the computer think its a image file. 2. load the image using fopen (d://crushme//images//1.jpg, r); ?php header(Content-type: image/jpeg); fopen (d://crushme//images//1.jpg, r); ? The image http://server/newman/ImageTEST/image.php; cannot be displayed, because it contains errors. This returns this error (above) Yes 1. Image is in the right location. Yes 2. I'm stuck. Any Suggestions would be very good. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php