Code: Select all
function donateInitiation($req = null, $res = null) {
// (...)
ob_end_clean();
header("Connection: close\r\n");
header("Content-Encoding: none\r\n");
ignore_user_abort(true);
ob_start();
json($copy); // json = echo json_encode, zwrócenie danych w formacie JSON
$size = ob_get_length();
header("Content-Length: $size");
ob_end_flush();
flush();
ob_end_clean();
if(session_id())
{
session_write_close();
}
// (...) - dalsze operacje
}
Code: Select all
jimport('joomla.plugin.plugin');
class plgAjaxLatestarticles extends JPlugin{
function onAjaxLatestarticles() {
require_once "donation.php";
$myShop->donateInitiation();return;
}}
Proszę o przeniesienie tematu, jeśli to nie jest właściwe dla niego miejsce.