I need some help with this please I can't get a handle on it.
Sorun bir ajax çağrısı ile statik yöntemleri ile bu durumda, bir sınıf yöntemi çağırmak istiyor.
I have put the helper class in the same folder as the script that is called by ajax for easy referencing and try to include it. Could it be that my refencing is wrong?
Ajax tarafından çağrılan dosyada bir TestClass yaparsanız ben bir yanıt alabilirsiniz.
class test {
public function testit() {
return "testit";
}
}
$t=new test;
$check= $t->testit();
switch($action) {
case "someaction":
$data = array();
$file='input_helper.php';
include_once $file;
$check= input_helper::ip_address();
header('Content-type: application/json');
$output = array(
"check" => $check,
"user" => $data
);
echo json_encode($output);
exit(0); // Stop script.
break;
//...
EDIT FOR MORE CLARIFICATION
The action is set as a post variable in the ajax function The ajax url points to a script that takes some action based on the posted variables
teşekkürler, Richard