Re: Reliable header sending mechanism in php 6

From: Date: Wed, 28 Nov 2007 06:38:37 +0000
Subject: Re: Reliable header sending mechanism in php 6
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-33481@lists.php.net to get a copy of this message
On 11/28/07, Ezra Nugroho <enugroho@spikesource.com> wrote: > In my mind, it is still unreliable... > When I write my library, how can I enforce people who adopt it to enable > ob? > > Furthermore, I think it's quite annoying that some functions may not > work just because of an inclusion of a blank space somewhere in a file > that you don't maintain. > > As php applications get bigger, and developers have only a small scope > of the big picture, the reliability of the functions becomes bigger and > bigger deal. Enforcing people to use some specific way of coding to use library is incorrect, anyway. But, you can correctly handle the situation (i.e. provide a meaningful error to the user) by making a simple check: http://docs.php.net/headers-sent -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

« previous php.internals (#33481) next »