call a function from a remote include() php file
Posted: Sat Dec 01, 2007 2:42 am
I'm trying to set up a general error reporting tool for all the websites I build which will all call a function from my main website. This way I'll only have to update the one file to make any changes. I'm trying:
The file error_report.php begins like this:
I'm asking because the script works fine when it's included by a script in the same domain as it. When I try to include error_report.php remotely, it just tells me "Fatal error: Call to undefined function: report_error()". The file's being included; it's just not able to see the function. Any ideas?
Code: Select all
include('http://mysite.com/error_report.php');
report_error("9001", "0", "0", "http://thesite.com", "0");The file error_report.php begins like this:
Code: Select all
<? function report_error($errorcode, $headertype, $messagetype, $domain, $submextra) {
...I'm asking because the script works fine when it's included by a script in the same domain as it. When I try to include error_report.php remotely, it just tells me "Fatal error: Call to undefined function: report_error()". The file's being included; it's just not able to see the function. Any ideas?