anyway, if you would really like to do this you could use output buffering function to 
send
headers from anywhere in your script, ofcourse delaying output.

check the manual part LXXII. Output Control Functions ..

bvr.


On Fri, 4 Jan 2002 22:37:13 -0500, Brian Clark wrote:

>* harry ([EMAIL PROTECTED]) [Jan 04. 2002 10:44]:
>
>> Hi all
>
>Hi Harry
>
>> I have been trying to use PEAR and have come to a standstill.
>
>> The following:
>
>> <?php
>
>> require_once ("HTML/Page.php");
>
>
>
>> /* PAGE SETUP */
>>   $p = new HTML_Page();
>>   $p->setCache("true");
>>   echo "TEST 1";
>
>Try commenting the above line out.
>
>>   //$p->toHtml();
>>   echo "TEST 2";
>
>Try commenting the above line out also.
>
>>  // $p->setTitle("Jobsite Page");
>
>>   $p->display();
>
>because in the display() method, it's sending header()s:
>
>
>function display() 
>{   
>  if(! $this->_cache) {
>    header("Expires: Tue, 1 Jan 1980 12:00:00 GMT");
>    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
>    header("Cache-Control: no-cache");
>    header("Pragma: no-cache");
>  }
>  $strHtml = $this->toHtml();
>  print $strHtml;
>} // end func display
>
>
>> Produces the following error:
>
>Which is why you are getting this error about header information:
>
>>  TEST 1TEST 2
>> Warning: Cannot add header information - headers already sent by (output 
>> started at /var/www/html/website/jobix/php_test/test_form.php:4) in 
>> /usr/share/php/HTML/Page.php on line 136
>
>-- 
>Brian Clark | Avoiding the general public since 1805!
>Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
>A day without sunshine is like, night.
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to