note 49835 added to ref.image

From: Date: Thu, 10 Feb 2005 01:13:03 +0000
Subject: note 49835 added to ref.image
Groups: php.notes 
Request: Send a blank email to php-notes+get-84753@lists.php.net to get a copy of this message
If you're looking for a way to JUST SEND OUT AN IMAGE FILE (existing in your filesystem), you don't need GD (or any other extension) at all. [GD may wrongly appear to beginners as the only or the preferred option. Well, this section DID confuse me.] Correct me if I'm wrong, but something like the following will do perfectly well in this case (tested with PHP5): <?php header("Content-type: image/jpeg"); include("photo.jpg"); ?> That's looks like the most efficient way to get any (binary) file sent to the client's browser. Just don't forget to set the right header. ---- Manual Page -- http://www.php.net/manual/en/ref.image.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49835 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49835&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49835&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49835&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49835&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49835&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49835&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84753) next »