MarkMan5 Posted April 5, 2006 Share Posted April 5, 2006 How can I, or is it possible, to 'include' or 'require' a php page and send a query string as well?ex:[code]include $_SERVER['DOCUMENT_ROOT']."/help_page.php?table=gen_help";[/code]thanks! Quote Link to comment Share on other sites More sharing options...
Hooker Posted April 6, 2006 Share Posted April 6, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Example 16-7. include() through HTTP<?php/* This example assumes that www.example.com is configured to parse .php * files and not .txt files. Also, 'Works' here means that the variables * $foo and $bar are available within the included file. */// Won't work; file.txt wasn't handled by www.example.com as PHPinclude 'http://www.example.com/file.txt?foo=1&bar=2';// Won't work; looks for a file named 'file.php?foo=1&bar=2' on the// local filesystem.include 'file.php?foo=1&bar=2';// Works.include 'http://www.example.com/file.php?foo=1&bar=2';$foo = 1;$bar = 2;include 'file.txt'; // Works.include 'file.php'; // Works.?> [/quote]:) Quote Link to comment Share on other sites More sharing options...
MarkMan5 Posted April 6, 2006 Author Share Posted April 6, 2006 Sweet! It works now, thanks. I knew it was going to be an easy fix. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.