<?php require dirname(__DIR__) . './autoload.php'; use Main\controllers\AjaxController as Ajax; $controller = new Ajax(); $response = $controller->update($_POST['id'], $_POST['value']); print json_encode(array('response' => $response));