Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

require function with php file with $_GET arguemtns

Status
Not open for further replies.

lefteyecc

Programmer
Feb 22, 2005
25
US
Is it possible to do something like t this?

require("page.php?id=1");

?
 
see header


______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Let me interpret your question another way....

If the php.ini setting allow_url_open is set to "on" or "1", then you can include or require files via URL.

There is a huge "gotcha", though. If you open a PHP or other script file via URL, it will be as though you had opened it in a web browser. The script will be executed on the foreign server, not on your server, and all that will be included in your script is the output of that script run, not the actual source PHP code.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top