- Original Message -
From: "thor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 11:58 AM
Subject: Re: [PHP] include("blah.php?var=this"); doesn't work?!
> Any include page you use will au
> Uh, why? Adding ?asin$asin makes absolutely no sense in an include since
> included files share the same namespace as the parent file. You can
> simply do:
Er, Rasmus. Do you mean "scope"? You're usually right on target with your
comments, so I'm sure that's what you meant :-)
Speaking o
> Adding ?asin=$asin doesn't make much sense but
> do it like this:
>
> include('book_reviews.php?asin=' . $asin);
Which makes just as little sense. Included files share the same namespace
as the file doing the including. You don't pass arguments to included
files.
-Rasmus
--
PHP General Ma
You don't need to go through these hoops.
Any include page you use will automatically use any variable that has been set in the
master page.
Thus, all you need to do is include the book_reviews.php page, and the $asin variable
will work in that one IF it has been set in the master file. If it
PROTECTED]
> Subject: [PHP] include("blah.php?var=this"); doesn't work?!
>
>
> I need to be able to do:
>
> if (isset($asin))
> {
> include("book_reviews.php?asin=$asin");
> }
> else
> {
> include("book_reviews.php"
AIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 12:27 PM
Subject: [PHP] include("blah.php?var=this"); doesn't work?!
> I need to be able to do:
>
> if (isset($asin))
> {
> include("book_reviews.php?asin=$asin");
> }
>
Uh, why? Adding ?asin$asin makes absolutely no sense in an include since
included files share the same namespace as the parent file. You can
simply do:
$asin = 123;
include 'book_reviews.php';
And the $asin variable will be accessible to you book_reviews.php script.
-Rasmus
On Thu, 8 Feb 200
I need to be able to do:
This is embeded in one of my sites pages..However, the call with the var
added on won't work, it seems like its looking for a file with that whole
name. Does anyone know how I can do this?
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://ww
8 matches
Mail list logo