First Happy New Year to all.
I'm stuck on a simple case in php and maybe you can lightup my mind here:
I have php page with js script. This script (based on jquery) contains a document ready event function that makes an Ajax call :
$.ajax({
type: "POST",
url: "actions/DatasourceEmail.php",
data: param,
dataType: "json",
dataFilter: function(data, type){
return data;
},
error: function(xhj, statut, thrown){
alert(xhj.responseText);
},
success: function(result){
...
This working well. My problem is on server side. When I instanciate a class, the code doesn't go inside and instanciate, by the way I don't think so. I have a logging function (singleton) which traces on the first call. But not inside the class when I instanciate
class testclass
{
function instance(){
ApplicationMedSoft::CurrentApplication()->Trace("@@@@ initialisation !!!");
}
}
...
ApplicationMedSoft::CurrentApplication()->Trace("@@@@ initialisation !!!");
$flex = new testclass();
Result log:
...
[23/01/2018 9:06:34] - [SQL] ==> 1 resultat(s)
[23/01/2018 9:06:34] - @@@@ initialisation !!! <= First call
??? second (inside class??)
All my files are correctly included It's like my singleton is not working is this class, but in some others classes it's working. By looking for too much the problem, I thik I can't see it anymore. Help :)
Thanks for reading
Iainh.