RE: [PHP] Cold Fusion ->PHP cont...
| From: | Wizaerd | Date: | Tue, 11 Jul 2000 17:34:04 +0000 |
| Subject: | RE: [PHP] Cold Fusion ->PHP cont... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5957@lists.php.net to get a copy of this message | ||
Actually, using header() relocates the browser to the desired URL which is
not a part of fusebox methodology. If it were, then fusebox would be
littered with CFLOCATION calls, which it is not, it is littered with
CFINCLUDE calls. Everything loads through the index.cfm or index.php in
this case, so using include() would be the appropriate method. But you
still cannot pass parameters to an included file, whereas my original
statement is still valid.
> -----Original Message-----
> From: redman [mailto:redman]On Behalf Of Michael Stearne
> Sent: Tuesday, July 11, 2000 6:13 AM
> To: Wizaerd
> Cc: Kelly Meeks; php-general@lists.php.net
> Subject: Re: [PHP] Cold Fusion ->PHP cont...
>
>
> 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