$e");
}
function my_error_handler($no,$str,$file,$line) {
$e = new ErrorException($str,$no,0,$file,$line);
my_exception_handler($e); /* Do not throw, simply call error handler with exception object */
}
set_error_handler('my_error_handler');
set_exception_handler('my_exception_handler');
$config = array(
'bd' => $_POST['bd'],
'uid' => $_POST['uid'],
'passwd' => $_POST['passwd'],
'url' => $_POST['url'],
);
$code = $_POST['code'];
if (!$config['bd'] OR !$config['uid'] OR !$config['passwd'] OR !$config['url'] OR !$code) {
echo '
Invalid configuration
';
} else {
/*$open = new OpenERP($config);
$p = $open->res_partner->get(1);
print $p->id;*/
$code_replace = '$config = '.var_export($config, true).';
'.$code;
print "
result
";
print "
$code_replace
";
eval($code_replace);
}
}
?>