Page 1 of 1

Unable to include file with query string?

Posted: Thu Apr 03, 2008 10:21 am
by JAB Creations
When I include a file with a query string PHP claims the file does not exist. How do I make PHP aware of the file and correctly execute the query string when it includes the file?

Code: Select all

include("file.php?php=doh");

Re: Unable to include file with query string?

Posted: Thu Apr 03, 2008 10:35 am
by JAB Creations
From what I'm reading I think I can get around the problem using a global scope variable... :roll:

Re: Unable to include file with query string?

Posted: Thu Apr 03, 2008 10:45 am
by JAB Creations
Yeah using a global scope variable works. Don't mind me, I'm just :crazy:. :mrgreen:

Re: Unable to include file with query string?

Posted: Thu Apr 03, 2008 10:55 am
by onion2k
Globals are bad, mmmkay.

Re: Unable to include file with query string?

Posted: Thu Apr 03, 2008 10:56 am
by JAB Creations
Err actually I'm probably still not using the terminology correctly...if a variable is defined inside of an if/else argument what level of scope is it referred to as?