EchoFool Posted March 9, 2008 Share Posted March 9, 2008 Why can't we use includes with GET involved like this: include("globalfunctionlist.php?function=1"); because it would be pretty handy to do so..... i just get error syntax relating to it... is there any other way to do this (not using header location how ever) ??? Quote Link to comment https://forums.phpfreaks.com/topic/95291-includes-with-a-get/ Share on other sites More sharing options...
BlueSkyIS Posted March 9, 2008 Share Posted March 9, 2008 just set function on the outside: $function = 1; include("globalfunctionlist.php"); // $function is available to globalfunctionlist.php Quote Link to comment https://forums.phpfreaks.com/topic/95291-includes-with-a-get/#findComment-488069 Share on other sites More sharing options...
Daniel0 Posted March 9, 2008 Share Posted March 9, 2008 Because the ?function=1 part is HTTP specific and include() includes files on the filesystem. Quote Link to comment https://forums.phpfreaks.com/topic/95291-includes-with-a-get/#findComment-488070 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.