Reply to Re: How to view headers that are sent php4

Your name:

Reply:


Posted by Toby A Inkster on 03/09/07 02:47

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!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация