PHP ohne schließende ?> Tags

März 26th, 2006

Schon gewusst, man sollte schließende PHP Tags (?>) am Ende von PHP Dateien gänzlich vermeiden.

Das wird auch auf den PHP-Seiten selbst beschrieben.

Note: The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include() or require(), so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later. It is also handy if you use output buffering, and would not like to see added unwanted whitespace at the end of the parts generated by the included files.

Find ich schön. Minimalismus pur.


Trackback URI | Comments RSS

Leave a Reply

Name (erforderlich)

Email (erforderlich)

Webseite

Speak your mind