- Code: Select all
function testfunc($a,$b)
{
return $a." test ".$b;
}
$ajax = new PHPLiveX();
$ajax->Ajaxify(array("testfunc"));
$ajax->Run();
works but
- Code: Select all
2.php
function testfunc($a,$b)
{
return $a." test ".$b;
}
1.php
include("2.php");
$ajax = new PHPLiveX();
$ajax->Ajaxify(array("testfunc"));
$ajax->Run();
gives me this error:
- Code: Select all
PHP Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'testfunc' was given in E:\test\PHPLiveX.php on line 178
According to function_exists the function is there and its also callable. Can you help me on how to fix this problem? Thanks in advance and keep the good work up
