| Author |
PHP header() function
|
|
| mail1_fr 2005-08-04, 5:01 pm |
| Hi,
I have 2 questions :
1 - How to launch a sheet S2 from a sheet S1 ?
------------------------------------------------
We have to is the header() function or do there is something else ? Like
"Run S2" ?
header("Location:../users/admin.php"); ??
2 - What is the exact functionality of header() and how ton use it ?
------------------------------------------------------------------
I get this error :
Warning: Cannot modify header information - headers already sent by (output
started at c:\program
files\easyphp1- 8\www\essaisphp\essais\essai1\connection
\connection_site.php:
14) in c:\program
files\easyphp1- 8\www\essaisphp\essais\essai1\connection
\connection_site.php
on line 40
Thank you.
R
| |
|
| "mail1_fr" <mail1_fr@yahoo.fr> wrote in message
news:42f22579$0$32367$636a15ce@news.free.fr...
>
> 2 - What is the exact functionality of header() and how ton use it ?
> ------------------------------------------------------------------
>
> I get this error :
>
> Warning: Cannot modify header information - headers already sent by
> (output
> started at c:\program
> files\easyphp1- 8\www\essaisphp\essais\essai1\connection
\connection_site.php:
> 14) in c:\program
> files\easyphp1- 8\www\essaisphp\essais\essai1\connection
\connection_site.php
> on line 40
You have to call header() before there is any output. It appears that there
is output at line 14, and you are calling header() at line 40, if I'm
reading the error right.
| |
|
|
| Bas Varkevisser 2005-08-06, 8:59 am |
| This goes wrong when your hosting party uses Microsoft IIS as webserver.
Apache handles this ok (this lets you send headers at any time, IIS
doesn't).
There is a PHP function that lets you buffer all output before its sent to
the webserver.
I believe the ob_start can help you.
Bas.
"mail1_fr" <mail1_fr@yahoo.fr> wrote in message
news:42f22579$0$32367$636a15ce@news.free.fr...
> Hi,
>
> I have 2 questions :
>
> 1 - How to launch a sheet S2 from a sheet S1 ?
> ------------------------------------------------
>
> We have to is the header() function or do there is something else ? Like
> "Run S2" ?
>
> header("Location:../users/admin.php"); ??
>
>
>
> 2 - What is the exact functionality of header() and how ton use it ?
> ------------------------------------------------------------------
>
> I get this error :
>
> Warning: Cannot modify header information - headers already sent by
> (output
> started at c:\program
> files\easyphp1- 8\www\essaisphp\essais\essai1\connection
\connection_site.php:
> 14) in c:\program
> files\easyphp1- 8\www\essaisphp\essais\essai1\connection
\connection_site.php
> on line 40
>
>
> Thank you.
>
> R
>
>
>
>
>
|
|
|
|