You need to put line 6 ahead of all the HTML, ie make it line 0.

ed

At 04:10 AM 5/30/2002 -0700, Anton Heryato wrote:
>this script below is delete.inc
>and the lagi.php is ..
>1:<html><head><title>:PHp</title></head>
>2:<body>
>3:<h1>hahahahha</h1>
>4:<?
>5:require 'delete.inc';
>6:deleteCookies();
>7:printf("can do it`");
>8:
>9:?>
>10:</body>
>11:</html>
>
>so, which one in line 4 have send anything first
>please help me to fixed
>
>regards
>anton
>
>-----Original Message-----
>From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 29, 2002 1:37 PM
>To: Anton Heryato; [EMAIL PROTECTED]
>Subject: Re: [PHP] Warning: Cannot add header information - headers
>already sent by
>
>
>You can't send anything to the browser before you send a header or cookie.
>Apparently, lagi.php has sent something, though, on line 4. Fix that and you
>will be fine.
>
>---John Holmes...
>
>----- Original Message -----
>From: "Anton Heryato" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, May 30, 2002 6:37 AM
>Subject: [PHP] Warning: Cannot add header information - headers already sent
>by
>
>
> > i have one function name deleteCookees that have this error message
> >
> > Warning: Cannot add header information - headers already sent by (output
> > started at /home/reymond/html/phpreport/lagi.php:4) in
> > /home/reymond/html/phpreport/delete.inc on line 10
> > the script
> >
> > <?
> > function deleteCookies()
> > {
> >         for ($i=0; $i<$total_items; $i++)
> >                 {
> >                 setcookie("items_tray[$i]","");
> >                 setcookie("quantity[$i]","");
> >                 }
> >
> > setcookie("items_tray","");
> > setcookie("total_items","");
> > setcookie("quantity","");
> >
> > }
> > ?>
> >
> > could anybody tell me why this happen and howto fixed
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to