Re: Cold Fusion ->PHP cont...
| From: | Michael Stearne | Date: | Tue, 11 Jul 2000 13:12:46 +0000 |
| Subject: | Re: Cold Fusion ->PHP cont... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5955@lists.php.net to get a copy of this message | ||
The thing is, you are not passing a URL to include. When you use include you
are "including" in your script the contents of another local file. What you
want to do is use the header() function to bounce the user to another page.
Your code is valid for header, so you would write:
> $theloc="UPI_RecordAction.php3?RecordID=$row[0]";
> header("Location: ".$theloc);
Michael
Wizaerd wrote:
> you cannot pass variables in an include's url... fortunately the included
> file will have access to whatever parameters you've define right above it,
> so there's no need to pass them as URL parameters...
>
> > -----Original Message-----
> > From: Kelly Meeks [mailto:meeks@rightangleinc.com]
> > Sent: Tuesday, July 11, 2000 1:11 PM
> > To: php-general@lists.php.net
> > Subject: [PHP] Cold Fusion ->PHP cont...
> >
> >
> > Hey Folks,
> >
> > Bumping my head on using the include statement.
> >
> > The following code snippet..
> >
> > if ($temp=1)
> > {
> > $theloc="UPI_RecordAction.php3?RecordID=$row[0]";
> > include($theloc);
> > }
> > else
> > {
> > $theloc="UPI_RecordAction.php3?RecordID=$RecordID";
> > include($theloc);
> > }
> >
> > generates this error...
> >
> > Warning: Failed opening 'UPI_RecordAction.php3?RecordID=2' for
> > inclusion in
> > /home/user2/rangle/WWW/clients/upi2/UPI_RecordAction.php3 on line 43
> >
> > I have no idea why it fails. I can paste in the url info in my
> > browser, and it finds the page no problem. Any suggestions?
> >
> > Also, Cold Fusion has a command (cflocation) that will, instead
> > of including one file in another, will redirect to specific page.
> > Is there a PHP equivalent?
> >
> > Thanks for the help.
> >
> > Kelly
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net