FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » this is my code i am not getting images throuh php script
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: this is my code i am not getting images throuh php script [message #176574 is a reply to message #176573] Mon, 09 January 2012 22:04 Go to previous messageGo to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
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
>>>> >> -----------------
>>>> >> <?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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: repair SUSE php5 -a
Next Topic: Learn Chinese (Mandarin) faster by using flashcards with pictures
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 16:55:06 GMT 2024

Total time taken to generate the page: 0.05188 seconds