escapo Posted August 8, 2010 Share Posted August 8, 2010 trying to use a require but not working properly Fatal error: require() [function.require]: Failed opening required 'get_extra.php?id=1' (include_path='.') first thing set on page is.. page is profile.php?id=1 $userid = $_GET['id']; code is: require "get_extra.php?id=$userid"; what can i do to fix this? thanks Quote Link to comment Share on other sites More sharing options...
l4nc3r Posted August 8, 2010 Share Posted August 8, 2010 First off, bad grammar is annoying. Clean it up. Secondly, your code is messy. You should be using single quotes for speed and readability, the require function should be called as a function, and there's no point in using a $userid variable -- just use the $_GET var. Now on to the actual problem -- does get_extra.php exist in the same directory as the file you're trying to include it from? 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.