Hi,
I'm not a php wizard though I have read one book on php. I also code in asp.net
I want to understand when I include a file on a remote server, why do I get an error message of undefined function?
include "http://www.link-exchangers.com/fadmin/config.php";
include "http://www.link-exchangers.com/fadmin/functions.php";
$in_file = file_get_contents_me("http://www.link-exchangers.com/f/".$m_localTemplate);
When one includes a file, doesn't that stick all of the files available functions into memory?
Here is my error message:
Fatal error: Call to undefined function: file_get_contents_me() in /usr/local/4admin/apache/vhosts/sanjosecandle.com/httpdocs/links/add_link.php on line 8
In order for php to see my function, does it have to be on the local machine?
Question regarding undefined function
Moderator: General Moderators
-
linkexchangers
- Forum Newbie
- Posts: 2
- Joined: Mon Sep 15, 2008 11:47 pm
Re: Question regarding undefined function
Hi,
There is no function like file_get_contents_me() in PHP. The correct function is file_get_contents()
Regards
There is no function like file_get_contents_me() in PHP. The correct function is file_get_contents()
Regards
-
linkexchangers
- Forum Newbie
- Posts: 2
- Joined: Mon Sep 15, 2008 11:47 pm
Re: Question regarding undefined function
The function is in a file called functions.php my friend. It is not part of php.
Re: Question regarding undefined function
The problem is that you're including the files with the full path ... "http://www.link-exchangers.com/fadmin/functions.php" ... that will make PHP go and fetch that page from the internet rather than from the filesystem, and as that page is basically blank when you view it online your functions aren't found. Include it as a local file, eg "./fadmin/functions.php".