Jump to content

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


escapo

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?

 

thanks

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 thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.