Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4365 > unrolled thread

this is my code i am not getting images throuh php script

Started bysrikanth <sritullimilli@gmail.com>
First post2012-01-09 07:23 -0800
Last post2012-01-11 15:51 +0100
Articles 7 on this page of 27 — 10 participants

Back to article view | Back to comp.lang.php


Contents

  this is my code i am not getting images throuh php script srikanth <sritullimilli@gmail.com> - 2012-01-09 07:23 -0800
    Re: this is my code i am not getting images throuh php script Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-09 07:37 -0800
      Re: this is my code i am not getting images throuh php script Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-01-09 17:25 +0100
        Re: this is my code i am not getting images throuh php script The Natural Philosopher <tnp@invalid.invalid> - 2012-01-09 17:35 +0000
          Re: this is my code i am not getting images throuh php script "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-09 19:48 +0100
            Re: this is my code i am not getting images throuh php script The Natural Philosopher <tnp@invalid.invalid> - 2012-01-09 19:33 +0000
              Re: this is my code i am not getting images throuh php script "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-09 21:20 +0100
                Re: this is my code i am not getting images throuh php script The Natural Philosopher <tnp@invalid.invalid> - 2012-01-09 20:38 +0000
                  Re: this is my code i am not getting images throuh php script "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-09 21:53 +0100
                    Re: this is my code i am not getting images throuh php script Luuk <Luuk@invalid.lan> - 2012-01-09 23:04 +0100
                      Re: this is my code i am not getting images throuh php script "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-09 23:08 +0100
                        ommiting closeing tag in PHP   [Re: this is my code i am not getting images throuh php script] Luuk <Luuk@invalid.lan> - 2012-01-10 11:58 +0100
                          Re: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script] Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-10 03:15 -0800
                            Re: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script] The Natural Philosopher <tnp@invalid.invalid> - 2012-01-10 12:34 +0000
                              Re: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script] Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-10 05:24 -0800
                          Re: ommiting closeing tag in PHP   [Re: this is my code i am not getting images throuh php script] The Natural Philosopher <tnp@invalid.invalid> - 2012-01-10 12:33 +0000
                            Re: ommiting closeing tag in PHP   [Re: this is my code i am not getting images throuh php script] Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-10 07:54 -0500
                              Re: ommiting closeing tag in PHP   [Re: this is my code i am not   getting images throuh php script] "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-10 17:16 +0100
                                Re: ommiting closeing tag in PHP   [Re: this is my code i am not   getting images throuh php script] Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-10 14:56 -0500
                                  Re: ommiting closeing tag in PHP   [Re: this is my code i am not     getting images throuh php script] "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-10 22:08 +0100
                                    Re: ommiting closeing tag in PHP   [Re: this is my code i am not     getting images throuh php script] The Natural Philosopher <tnp@invalid.invalid> - 2012-01-10 21:11 +0000
                                      Re: ommiting closeing tag in PHP   [Re: this is my code i am not getting images throuh php script] Richard <rgrdev_@gmail.com> - 2012-01-10 22:23 +0100
                                        Re: ommiting closeing tag in PHP   [Re: this is my code i am not getting images throuh php script] The Natural Philosopher <tnp@invalid.invalid> - 2012-01-10 21:31 +0000
                                          Re: ommiting closeing tag in PHP   [Re: this is my code i am not   getting images throuh php script] "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-10 22:45 +0100
                                          Re: ommiting closeing tag in PHP   [Re: this is my code i am not getting images throuh php script] Luuk <Luuk@invalid.lan> - 2012-01-10 23:02 +0100
                                        Re: ommiting closeing tag in PHP Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-16 01:30 +0100
              Re: this is my code i am not getting images throuh php script Arno Welzel <usenet@arnowelzel.de> - 2012-01-11 15:51 +0100

Page 2 of 2 — ← Prev page 1 [2]


#4406 — Re: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script]

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2012-01-10 21:11 +0000
SubjectRe: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script]
Message-ID<jei9ha$pcu$1@news.albasani.net>
In reply to#4405
M. Strobel wrote:
> Am 10.01.2012 20:56, schrieb Jerry Stuckle:
>> On 1/10/2012 11:16 AM, M. Strobel wrote:
>>> Am 10.01.2012 13:54, schrieb Jerry Stuckle:
>>>> On 1/10/2012 7:33 AM, The Natural Philosopher wrote:
>>>>> Luuk wrote:
>>>>>> On 09-01-2012 23:08, M. Strobel wrote:
>>>>>>> Am 09.01.2012 23:04, schrieb Luuk:
>>>>>>>> On 09-01-2012 21:53, M. Strobel wrote:
>>>>>>>>> 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?
>>>>>>>>
>>>>>>>>
>>>>>>> search string was php closing tag
>>>>>>>
>>>>>>> http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> /Str.
>>>>>> damn, they actually documented this UGLY feature ;)
>>>>>>
>>>>> Ugly, but damed usefull as my editor has a habit of adding an
>>>>> extra
>>>>> newline to the end of text files.
>>>>>
>>>> So get a good editor.
>>>>
>>> Now why should he "get a good editor" if he can omit the
>>> closing tag?
>>>
>>> /Str.
>> Because leaving off the close tag can cause problems later when
>> someone else edits the site, assuming close tags are there.
>>
>> And leaving off a closing tag to get round an editor problem is
>> just plain sloppy programming.  But we already know certain
>> people here don't care about that.
>>
> He has no editor problem, he can leave the closing tag off. Don't
> send him off in a goose chase.
> 
> I knew who would not be comfortable with this easy solution.
> 
Only because

(a) he didn't know it
  and
(b) I said it was useful.


NOTHING is easier than typing a ?> and then following it with a carriage 
return..


> /Str.

[toc] | [prev] | [next] | [standalone]


#4407 — Re: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script]

FromRichard <rgrdev_@gmail.com>
Date2012-01-10 22:23 +0100
SubjectRe: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script]
Message-ID<qjmx9vfe0y.fsf@news.eternal-september.org>
In reply to#4406
The Natural Philosopher <tnp@invalid.invalid> writes:

> M. Strobel wrote:
>> Am 10.01.2012 20:56, schrieb Jerry Stuckle:
>>> On 1/10/2012 11:16 AM, M. Strobel wrote:
>>>> Am 10.01.2012 13:54, schrieb Jerry Stuckle:
>>>>> On 1/10/2012 7:33 AM, The Natural Philosopher wrote:
>>>>>> Luuk wrote:
>>>>>>> On 09-01-2012 23:08, M. Strobel wrote:
>>>>>>>> Am 09.01.2012 23:04, schrieb Luuk:
>>>>>>>>> On 09-01-2012 21:53, M. Strobel wrote:
>>>>>>>>>> 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?
>>>>>>>>>
>>>>>>>>>
>>>>>>>> search string was php closing tag
>>>>>>>>
>>>>>>>> http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> /Str.
>>>>>>> damn, they actually documented this UGLY feature ;)
>>>>>>>
>>>>>> Ugly, but damed usefull as my editor has a habit of adding an
>>>>>> extra
>>>>>> newline to the end of text files.
>>>>>>
>>>>> So get a good editor.
>>>>>
>>>> Now why should he "get a good editor" if he can omit the
>>>> closing tag?
>>>>
>>>> /Str.
>>> Because leaving off the close tag can cause problems later when
>>> someone else edits the site, assuming close tags are there.
>>>
>>> And leaving off a closing tag to get round an editor problem is
>>> just plain sloppy programming.  But we already know certain
>>> people here don't care about that.
>>>
>> He has no editor problem, he can leave the closing tag off. Don't
>> send him off in a goose chase.
>>
>> I knew who would not be comfortable with this easy solution.
>>
> Only because
>
> (a) he didn't know it
>  and
> (b) I said it was useful.
>
> NOTHING is easier than typing a ?> and then following it with a carriage
> return..

How horrible. Are people really suggesting this hard to spot (when you
dont know it) hack as a way to develop code?  Leaving off closing
tags?!?!? 

[toc] | [prev] | [next] | [standalone]


#4408 — Re: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script]

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2012-01-10 21:31 +0000
SubjectRe: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script]
Message-ID<jeiamm$si7$1@news.albasani.net>
In reply to#4407
Richard wrote:
> The Natural Philosopher <tnp@invalid.invalid> writes:
> 
>> M. Strobel wrote:
>>> Am 10.01.2012 20:56, schrieb Jerry Stuckle:
>>>> On 1/10/2012 11:16 AM, M. Strobel wrote:
>>>>> Am 10.01.2012 13:54, schrieb Jerry Stuckle:
>>>>>> On 1/10/2012 7:33 AM, The Natural Philosopher wrote:
>>>>>>> Luuk wrote:
>>>>>>>> On 09-01-2012 23:08, M. Strobel wrote:
>>>>>>>>> Am 09.01.2012 23:04, schrieb Luuk:
>>>>>>>>>> On 09-01-2012 21:53, M. Strobel wrote:
>>>>>>>>>>> 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?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> search string was php closing tag
>>>>>>>>>
>>>>>>>>> http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> /Str.
>>>>>>>> damn, they actually documented this UGLY feature ;)
>>>>>>>>
>>>>>>> Ugly, but damed usefull as my editor has a habit of adding an
>>>>>>> extra
>>>>>>> newline to the end of text files.
>>>>>>>
>>>>>> So get a good editor.
>>>>>>
>>>>> Now why should he "get a good editor" if he can omit the
>>>>> closing tag?
>>>>>
>>>>> /Str.
>>>> Because leaving off the close tag can cause problems later when
>>>> someone else edits the site, assuming close tags are there.
>>>>
>>>> And leaving off a closing tag to get round an editor problem is
>>>> just plain sloppy programming.  But we already know certain
>>>> people here don't care about that.
>>>>
>>> He has no editor problem, he can leave the closing tag off. Don't
>>> send him off in a goose chase.
>>>
>>> I knew who would not be comfortable with this easy solution.
>>>
>> Only because
>>
>> (a) he didn't know it
>>  and
>> (b) I said it was useful.
>>
>> NOTHING is easier than typing a ?> and then following it with a carriage
>> return..
> 
> How horrible. Are people really suggesting this hard to spot (when you
> dont know it) hack as a way to develop code?  Leaving off closing
> tags?!?!? 


It's not a 'closing tag' : its a switch to tell php to drop back into 
'spit out the source file raw' mode.

If you don't ever want it to do that...it seems a valid reasonable and 
apparently valid-in-terms-of-the-language-as-specified way to do it.

If the spec says its intrinsic to the language, a feature,  it can't be 
a hack can it?

How many people add semicolons to the last line of a CSS style block 
definition?

[toc] | [prev] | [next] | [standalone]


#4409 — Re: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script]

From"M. Strobel" <sorry_no_mail_here@nowhere.dee>
Date2012-01-10 22:45 +0100
SubjectRe: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script]
Message-ID<9n3pskFqgrU1@mid.uni-berlin.de>
In reply to#4408
Am 10.01.2012 22:31, schrieb The Natural Philosopher:
> Richard wrote:
>> The Natural Philosopher <tnp@invalid.invalid> writes:
>>
>>> M. Strobel wrote:
>>>> Am 10.01.2012 20:56, schrieb Jerry Stuckle:
>>>>> On 1/10/2012 11:16 AM, M. Strobel wrote:
>>>>>> Am 10.01.2012 13:54, schrieb Jerry Stuckle:
>>>>>>> On 1/10/2012 7:33 AM, The Natural Philosopher wrote:
>>>>>>>> Luuk wrote:
>>>>>>>>> On 09-01-2012 23:08, M. Strobel wrote:
>>>>>>>>>> Am 09.01.2012 23:04, schrieb Luuk:
>>>>>>>>>>> On 09-01-2012 21:53, M. Strobel wrote:
>>>>>>>>>>>> Just omit the closing tag in php-only files, it's easier
>>>>>>>>>>>> than the
>>>>>>>>>>>> ob_ functions.
>>>>>>>>>>>>
>>>>>>>>>>>> /Str.
---cut
>>>>>>>>>> /Str.
>>>>>>>>> damn, they actually documented this UGLY feature ;)
>>>>>>>>>
>>>>>>>> Ugly, but damed usefull as my editor has a habit of
>>>>>>>> adding an
>>>>>>>> extra
>>>>>>>> newline to the end of text files.
>>>>>>>>
>>>>>>> So get a good editor.
>>>>>>>
>>>>>> Now why should he "get a good editor" if he can omit the
>>>>>> closing tag?
>>>>>>
>>>>>> /Str.
>>>>> Because leaving off the close tag can cause problems later when
>>>>> someone else edits the site, assuming close tags are there.
>>>>>
>>>>> And leaving off a closing tag to get round an editor problem is
>>>>> just plain sloppy programming.  But we already know certain
>>>>> people here don't care about that.
>>>>>
>>>> He has no editor problem, he can leave the closing tag off.
>>>> Don't
>>>> send him off in a goose chase.
>>>>
>>>> I knew who would not be comfortable with this easy solution.
>>>>
>>> Only because
>>>
>>> (a) he didn't know it
>>>  and
>>> (b) I said it was useful.
>>>
>>> NOTHING is easier than typing a ?> and then following it with
>>> a carriage
>>> return..
>>
>> How horrible. Are people really suggesting this hard to spot
>> (when you
>> dont know it) hack as a way to develop code?  Leaving off closing
>> tags?!?!? 
> 
> 
> It's not a 'closing tag' : its a switch to tell php to drop back
> into 'spit out the source file raw' mode.

I think of it in terms of HMTL tags <?php   ?>

Everything between the tags (including them) is replaced by an
PHP eval of the contents.

> If you don't ever want it to do that...it seems a valid
> reasonable and apparently
> valid-in-terms-of-the-language-as-specified way to do it.
> 
> If the spec says its intrinsic to the language, a feature,  it
> can't be a hack can it?

I subscribe to that.

> How many people add semicolons to the last line of a CSS style
> block definition?

/Str.

[toc] | [prev] | [next] | [standalone]


#4410 — Re: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script]

FromLuuk <Luuk@invalid.lan>
Date2012-01-10 23:02 +0100
SubjectRe: ommiting closeing tag in PHP [Re: this is my code i am not getting images throuh php script]
Message-ID<a4put8-ida.ln1@luuk.invalid.lan>
In reply to#4408
On 10-01-2012 22:31, The Natural Philosopher wrote:
> Richard wrote:
>> The Natural Philosopher <tnp@invalid.invalid> writes:
>>
>>> M. Strobel wrote:
>>>> Am 10.01.2012 20:56, schrieb Jerry Stuckle:
>>>>> On 1/10/2012 11:16 AM, M. Strobel wrote:
>>>>>> Am 10.01.2012 13:54, schrieb Jerry Stuckle:
>>>>>>> On 1/10/2012 7:33 AM, The Natural Philosopher wrote:
>>>>>>>> Luuk wrote:
>>>>>>>>> On 09-01-2012 23:08, M. Strobel wrote:
>>>>>>>>>> Am 09.01.2012 23:04, schrieb Luuk:
>>>>>>>>>>> On 09-01-2012 21:53, M. Strobel wrote:
>>>>>>>>>>>> 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?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> search string was php closing tag
>>>>>>>>>>
>>>>>>>>>> http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> /Str.
>>>>>>>>> damn, they actually documented this UGLY feature ;)
>>>>>>>>>
>>>>>>>> Ugly, but damed usefull as my editor has a habit of adding an
>>>>>>>> extra
>>>>>>>> newline to the end of text files.
>>>>>>>>
>>>>>>> So get a good editor.
>>>>>>>
>>>>>> Now why should he "get a good editor" if he can omit the
>>>>>> closing tag?
>>>>>>
>>>>>> /Str.
>>>>> Because leaving off the close tag can cause problems later when
>>>>> someone else edits the site, assuming close tags are there.
>>>>>
>>>>> And leaving off a closing tag to get round an editor problem is
>>>>> just plain sloppy programming.  But we already know certain
>>>>> people here don't care about that.
>>>>>
>>>> He has no editor problem, he can leave the closing tag off. Don't
>>>> send him off in a goose chase.
>>>>
>>>> I knew who would not be comfortable with this easy solution.
>>>>
>>> Only because
>>>
>>> (a) he didn't know it
>>>  and
>>> (b) I said it was useful.
>>>
>>> NOTHING is easier than typing a ?> and then following it with a carriage
>>> return..
>>
>> How horrible. Are people really suggesting this hard to spot (when you
>> dont know it) hack as a way to develop code?  Leaving off closing
>> tags?!?!? 
> 
> 
> It's not a 'closing tag' : its a switch to tell php to drop back into
> 'spit out the source file raw' mode.
> 

it's NOT a switch to tell php to drop back into some other mode...

> If you don't ever want it to do that...it seems a valid reasonable and
> apparently valid-in-terms-of-the-language-as-specified way to do it.
> 

yes, something is specified

> If the spec says its intrinsic to the language, a feature,  it can't be
> a hack can it?
> 

it's not a hack

> How many people add semicolons to the last line of a CSS style block
> definition?

i recently installed drupal on a (test)system

when i do this:

cd ....drupal
$ grep -lir '?>' * | wc -l
124
$ find * -name "*.php" -type f | wc -l
151

(124 files with (at-least 1) closing tag,
 151 files with the extension '.php')

and not even all php-files have the '.php' extension.....

$ grep -lr '<?php' * | wc -l
1000

(1000 files with the php-opening-tag)

so, some 'programmers' seem to RELY on this behaviour ;-(


-- 
Luuk

[toc] | [prev] | [next] | [standalone]


#4465 — Re: ommiting closeing tag in PHP

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-01-16 01:30 +0100
SubjectRe: ommiting closeing tag in PHP
Message-ID<3742193.Odxabdfos6@PointedEars.de>
In reply to#4407
Richard wrote:

> The Natural Philosopher <tnp@invalid.invalid> writes:
>> M. Strobel wrote:
>>> Am 10.01.2012 20:56, schrieb Jerry Stuckle:
>>>> And leaving off a closing tag to get round an editor problem is
>>>> just plain sloppy programming.  But we already know certain
>>>> people here don't care about that.
>>> He has no editor problem, he can leave the closing tag off. Don't
>>> send him off in a goose chase.
>>>
>>> I knew who would not be comfortable with this easy solution.
>>
>> Only because
>>
>> (a) he didn't know it
>>  and
>> (b) I said it was useful.
>>
>> NOTHING is easier than typing a ?> and then following it with a carriage
>> return..
> 
> How horrible. Are people really suggesting this hard to spot (when you
> dont know it) hack as a way to develop code?  Leaving off closing
> tags?!?!?

Your keyboard is borken.

What exactly is your problem with avoiding the problem caused by adding the 
"closing tag"?  It is the *P*HP *H*ypertext *P*reprocessor.  It is 
*supposed* to output any character outside of <?php … ?> sections.


PointedEars
-- 
Sometimes, what you learn is wrong. If those wrong ideas are close to the 
root of the knowledge tree you build on a particular subject, pruning the 
bad branches can sometimes cause the whole tree to collapse.
  -- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>

[toc] | [prev] | [next] | [standalone]


#4424

FromArno Welzel <usenet@arnowelzel.de>
Date2012-01-11 15:51 +0100
Message-ID<4F0DA1DC.9060004@arnowelzel.de>
In reply to#4377
The Natural Philosopher, 2012-01-09 20:33:

> 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?

Yes.

> If so it would make life simpler

That's the reason, why this is often recommended.


-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.php


csiph-web