Jump to content

Fatal error: require() [function.require]...(include_path='.')


Recommended Posts

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?



Link to comment
Share on other sites

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?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.