|
Posted by Robert Cummings on 10/06/05 17:37
Here's the simple solution (put it at the top of your script:
ob_start();
Cheers,
Rob.
On Thu, 2005-10-06 at 10:30, Bruce Gilbert wrote:
> I checked and no white space involved. What would I need to put tin the
> exit()/die() function?
>
> On 10/6/05, tg-php@gryffyndevelopment.com <tg-php@gryffyndevelopment.com>
> wrote:
> >
> > Check to make sure absolutely nothing before the header() function is
> > outputing anything. No echos, no prints, no var_dumps, no HTML or even blank
> > lines.
> >
> > If it's something tangible like an echo or print or something, then
> > putting an exit()/die() function right before the header() function then
> > looking at the HTML source that you get should show you what the offending
> > output is.
> >
> > But again, if I recall, it can be something as simple as an empty line.
> >
> > -----------------------------------------
> > <?php
> >
> > // This should work because there's no output or white space above
> > header()
> > header('Location: thanks.php');
> >
> > ?>
> > -----------------------------------------
> >
> > -----------------------------------------
> >
> > <?php
> >
> > // This should fail (if I recall) because of the blank line that's sent
> > // before the PHP code block. This is considered output, and can't come
> > before
> > // any header statements
> >
> > header('Location: thanks.php');
> >
> > ?>
> > -----------------------------------------
> >
> >
> > = = = Original message = = =
> >
> > when I add that code I can the following error msg when submitting the
> > form.
> > " *Warning*: Cannot modify header information - headers already sent by
> > (output started at /home/webadmin/dedicated75.virtual.vps-
> > host.net/html/fortuneInteractive/Consultation_test.php:6<http://host.net/html/fortuneInteractive/Consultation_test.php:6>
> > <http://host.net/html/fortuneInteractive/Consultation_test.php:6>)
> > in */home/webadmin/dedicated75.virtual.vps-
> > host.net/html/fortuneInteractive/Consultation_test.php<http://host.net/html/fortuneInteractive/Consultation_test.php>
> > <http://host.net/html/fortuneInteractive/Consultation_test.php>
> > * on line *168* "
> > line 168 is the one with header( 'Location: thanks.php' );
> > on it.
> > can anyone explain why this is happening and how to rectify?
> > TIA
> >
> > On 10/5/05, Robert Cummings <robert@interjinn.com> wrote:
> > >
> > > On Wed, 2005-10-05 at 21:15, Bruce Gilbert wrote:
> > > > thanks for the reply.
> > > >
> > > > and where on the page would that need to go? Within the head tags?
> > > > and would it need to be within <?php ?>
> > >
> > > Right after this line:
> > >
> > > mail ($to, $subject, $msg, $mailheaders);
> > >
> > > And you will already be within PHP interpretation.
> > >
> > > Cheers,
> > > Rob.
> > > --
> > > .------------------------------------------------------------.
> > > | InterJinn Application Framework - http://www.interjinn.com |
> > > :------------------------------------------------------------:
> > > | An application and templating framework for PHP. Boasting |
> > > | a powerful, scalable system for accessing system services |
> > > | such as forms, properties, sessions, and caches. InterJinn |
> > > | also provides an extremely flexible architecture for |
> > > | creating re-usable components quickly and easily. |
> > > `------------------------------------------------------------'
> > >
> > >
> >
> >
> > --
> > ::Bruce::
> >
> >
> > ___________________________________________________________
> > Sent by ePrompter, the premier email notification software.
> > Free download at http://www.ePrompter.com.
> >
> >
>
>
> --
> ::Bruce::
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
Navigation:
[Reply to this message]
|