Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Date: Mon, 09 Jan 2012 23:04:03 +0100 From: Luuk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 Newsgroups: comp.lang.php Subject: Re: this is my code i am not getting images throuh php script References: <31838234.1649.1326122630052.JavaMail.geo-discussion-forums@prak33> <877e0961-7321-44dc-813c-920c855c08c1@j9g2000vby.googlegroups.com> <4f0b14ef$0$6940$e4fe514c@news2.news.xs4all.nl> <9n0r3hFi0lU1@mid.uni-berlin.de> <9n10hbFvhhU1@mid.uni-berlin.de> <9n12f4FgppU1@mid.uni-berlin.de> In-Reply-To: <9n12f4FgppU1@mid.uni-berlin.de> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Message-ID: Lines: 54 NNTP-Posting-Host: 2001:980:9089:1:216:76ff:fee1:aa6c X-Trace: 1326146702 news.xs4all.nl 6927 [2001:980:9089:1:216:76ff:fee1:aa6c]:34106 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:4381 On 09-01-2012 21:53, M. Strobel wrote: > Am 09.01.2012 21:38, schrieb The Natural Philosopher: >> M. Strobel wrote: >>> Am 09.01.2012 20:33, schrieb The Natural Philosopher: >>>> M. Strobel wrote: >>>>> Am 09.01.2012 18:35, schrieb The Natural Philosopher: >>>>>> The minimal code is something like >>>>>> >>>>>> send_passport.php >>>>>> ----------------- >>>>>> >>>>> header("Content-Type: image/jpeg"); >>>>>> readfile("F:/Mydocuments/Certificates/Passport/Passport.jpg"); >>>>>> ?> >>>>>> <<<...and no whitespace here!!! >>>>>> >>>>>> I mistrust using things that are designed for text strings for >>>>>> binary files. >>>>> Why not leave off the ?> tag? >>>>> >>>> Is that php legal? >>>> >>>> If so it would make life simpler >>>> >>>> >>>>> /Str. >>> >>> I read somewhere Zend leaves it off in its code. >>> >>> Works like a charm. >> >> Not too old to learn something, then. >> >> I'll use that next time one of my 'code only' scripts blows up.. >> >> >>> >>> /Str. > > Just re-checked it, it is official, leave it off. It caused me > headaches in one project I took over, there were tons of files > included, and I always had unwanted newlines in file output. > > Just omit the closing tag in php-only files, it's easier than the > ob_ functions. > > /Str. If you re-checked, could you also provide us with a link to where you found that info? -- Luuk