file_get_contents(VIEWSPATH . 'pages/login' . '.php')
$.ajax({
type: "GET",
url: '/ajax/login',
dataType: "json",
success: function (data) {
if (data.status) {
custom_popup({
html: data.message,
ok_btn: false
});
}
page_loading = false
}
});
ob_start();
include(VIEWSPATH . 'pages/login' . '.php');
$output = ob_get_contents();
ob_end_clean();
return $this->render_ajax($output);
Кто знает, может, это можно по-короче написать?
ob_start();
include(VIEWSPATH . 'pages/login' . '.php');
return $this->render_ajax(ob_get_clean();