Yavuz Bogazci ha scritto:
Hi,

is it possible to call php functions from jquery? I knew how to call
a .php page from jquery with $.post and to echo output or return a
JSON Object. But my application growth and there is an increase in
single php pages. This is very confusing and the filemanagement is
getting complicated.

How are you solving this problem? Is a good tutorial or info out
there? I have searched google and couldnt find a useful answer.

thank a lot
yavuz


I call a file named ajax.php, passing a parameter for example:

ajax.php?cmd=operators.getlist

In ajax.php I include myajaxfilesdir/operators.getlist.php

and inside myajaxfilesdir/operators.getlist.php

<?php
if(basename($_SERVER['SCRIPT_FILENAME']) == 'ajax.php') {
 // i do my stuff here
}
?>


--
gianiaz.net - web solutions
p.le bertacchi 66, 23100 sondrio (so) - italy
+39 347 7196482

Reply via email to