SitePoint Sponsor

User Tag List

View Poll Results: Do you?

Voters
78. You may not vote on this poll
  • Yes

    70 89.74%
  • No

    4 5.13%
  • I didn't know you could do that!

    4 5.13%
Page 3 of 3 FirstFirst 123
Results 51 to 54 of 54
  1. #51
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,479
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Quote Originally Posted by xmitchx
    Because you probably did something that required the headers not to be sent afte ryou included those files. A blank line will begin sending the HTTP 200 OK headers which is too late for cookies and such.

    Just rmeove the lines after your closing tag and it'd be fine.
    that's what I said, to which Chris Shiflett disagreed!!
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  2. #52
    SitePoint Addict DA Master's Avatar
    Join Date
    Apr 2004
    Location
    /etc/php.ini
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spikeZ
    I thought it was just standard to close what you open?
    Same here...

    If you didnt would it matter though? Especially if you include it into the page.

  3. #53
    SitePoint Enthusiast Zeldinha's Avatar
    Join Date
    Sep 2004
    Location
    Barcelona [Spain]
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I never had the "headers already sent" issue, yet I always close my PHP tags (well, my editor does it for me with autocompletion ).

    I always try to close the tags I open, be it PHP, HTML or whatever. It adds clarity to the script, in my opinion. And I'm used to it, anyway, always seen it that way.

  4. #54
    SitePoint Guru
    Join Date
    Nov 2002
    Posts
    841
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I always close. I didn't even know you didn't have to. I kinda like the comparison to the she-bang. This is PHP and thats that.

    On the other hand, does it mess up any of the tools, like the source code formatters, code coverage parser, etc? Leaving off the close kinda makes it an invalid processing instruction from an HTML specification standpoint:
    Processing instructions are a mechanism to capture platform-specific idioms. A processing instruction begins with <? and ends with >
    But then, I don't think the php PIs follow the HTML rules to the letter anyway.

    Maybe its best to always close in a mixed PHP/HTML file, but not to close in a pure PHP file?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •