[thelist] Pass querystring to server side include

Travis tbrunn at pgmusic.com
Fri Jan 21 14:24:37 CST 2005


Hi Jay

>> <!--#include virtual="stuff.php?thisVar=foo&thatVar=bar"-->

Yes, I was hoping it would be possible to not have fixed variables like
that, but to actually accept the user inputted querystring.  I know ssi has
a QUERY_STRING variable, but not sure if there's anyway to append it to the
file referenced in an include.

>> But why use these kinds of includes when you can use PHP's include?

Long story.  In short, user wants .htm extensions & the server guys are not
wanting to set things up so that .htm files are parsed for php.

Thanks,

Travis

----- Original Message -----
From: "Jay Blanchard" <jay.blanchard at niicommunications.com>
To: <thelist at lists.evolt.org>
Sent: Friday, January 21, 2005 11:32 AM
Subject: RE: [thelist] Pass querystring to server side include


[snip]
Does anyone know if it is possible to pass the querystring to a php file
through a server side include?

The include looks like this...

<!--#include virtual="stuff.php" -->

Unfortuneately php does not seem to have access to the environment
variables
automatically.
[/snip]

<!--#include virtual="stuff.php?thisVar=foo&thatVar=bar"-->

But why use these kinds of includes when you can use PHP's include?

http://www.php.net/include
--

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !




More information about the thelist mailing list