model view controller - Including required files on AJAX requested PHP page -
recently started learning how set mvc model. built simple single page application develop skills. requires config files classes (using __autoload) included in index file.
my question: suppose want include ajax calls php pages need aforementioned config data and/or classes generate output. presume i'd have include required files on each , every ajax requested php page, or might there way take care of "globally"?
many support.
i dont know why need config ajax calls.
ajax same path calling other normal calls asynchron.
$.ajax({ url: "/path/", // or "yourphpfile.php" type: "get", // or post data: {data:data} }).done(function(){ alert("success, happy"); }); you dont need config
Comments
Post a Comment