I have a PHP script that is called in 2 ways from a Dojo Ajax xhrGet call. The first time it is called with an "init" argument which causes the script to create an instance of the StateList class and read in a file of state names.
session_start();
@include('StateList.php');
require_once('phplog.php');
//start executing here
$comd=$_GET['nexturl'];
if($comd=="init") {
$st = new StateList("../data/statestxt.txt");
$_SESSION['statefile'] = $st;
}
İkinci ve daha fazla kez, başka xhrGet çağrı "getstate" argüman geçer ve aşağıdaki kod OTURUM diziden EyaletListesi sınıfının Ofr örneği almak için çalışır.
if($comd =="getstate") {
$st= $_SESSION['statefile'];
phplog("size=".$st->getSize());
}
However, the getSize() method is never executed, nor can I call any other method on the reconstituted StateList class instance.
Note that this is one PHP script that DOES include the class definition at the top and thus the class methods should be known and avaialble.
Ben burada ne eksik?