Re: HP syntax error, unexpected T_variable [message #179917 is a reply to message #179914] |
Wed, 19 December 2012 02:41 |
Twayne
Messages: 135 Registered: September 2010
Karma:
|
Senior Member |
|
|
In news:kar777$24g$1(at)dont-email(dot)me,
Adam Harvey <usenet(at)adamharvey(dot)name> typed:
> On Tue, 18 Dec 2012 11:50:11 -0500, Jerry Stuckle wrote:
>
>> On 12/18/2012 8:11 AM, M. Strobel wrote:
>>> Just for the many readers,
>>>
>>> the problem with the closing tag is, that you get
>>> difficult to control newlines and spaces in the output.
>>>
>>> This is hardly noticeable in HTML, but a big problem
>>> when serving binary files.
>>>
>>> /Str.
>>>
>>>
>>>
>> It is not a problem for good programmers. They know not
>> to place newline characters after the ?>. Additionally,
>> if one sneaks in, the error message generated is QUITE
>> clear.
>>
>> And BTW - PHP scripts are NOT "binary files".
>
> Of course not, but consider the case where you're
> outputting a JPEG image from a PHP script: there's not
> necessarily an obvious error message if there's trailing
> whitespace after a ?> (since PHP doesn't care), but the
> image will still be broken nonetheless.
>
> Most modern PHP coding standards I know of now recommend
> against the ?> for that reason. I personally agree.
>
> Of course, coding standards in general tend to be a bit
> of a religious issue!
>
> Adam
You're right there, Adam. I don't use that sort of tag/s so no big deal.
IIRC I set the server & .ini's to accept it, but I never used it. If it was
in my code somewhere, that was another stoopid move on my part!
Important thing is, I've got it fixed now.
HTH,
Twayne`
|
|
|