|
Posted by ircmaxell on 03/09/07 07:58
On Mar 8, 9:47 pm, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
> ircmaxell wrote:
> > I'm working on a php project modifying a CMS. I need to be able to
> > view the headers that the script is sending at runtime. In php5, I can
> > use headers_list(), but I'm using php4.
>
> You could try defining your own replacement for the header() function:
>
> function _header ($x)
> {
> $GLOBALS['HEADERS'][] = $x;
> header($x);
>
> }
>
> Wherever your code calls header(), replace it with _header(). Then you
> can use something like this:
>
> function _headers_list ()
> {
> return $GLOBALS['HEADERS'];
>
> }
>
> --
> Toby A Inkster BSc (Hons) ARCS
> Contact Me ~http://tobyinkster.co.uk/contact
> Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
>
> * = I'm getting there!
I would like to stay away from this for compatability reasons... I'm
modifying a popular CMS, and want to retain 3pd compatability. If it
was going to be just mine, I could just install a pecl package that
would give me the functionality needed... Thanks for your input...
[Back to original message]
|