Code Context header("Content-disposition: attachment; filename=\"" . $filename.".".$ext . "\"");
header('Content-Transfer-Encoding: binary');
readfile($filepath);
$viewFile = '/var/www/vhosts/dcschicken.com/httpdocs/app/View/Pages/download.ctp'
$dataForView = array(
'title' => 'POLISI HALAL',
'ext' => 'jpg',
'filepath' => 'https://www.dcschicken.com/img/view/files/fullsize/2023/12/5/657923b5-5080-43e1-99d7-041175359a77-ms-1500-page-0001.jpg',
'global_languages' => array(
(int) 0 => array(
'id' => '1',
'code' => 'eng',
'icon' => '/2021/03/c/605c3cee-cb80-4b1f-a5fd-0f65dc76668d-flag-eng.png'
),
(int) 1 => array(
'id' => '2',
'code' => 'mys',
'icon' => '/2021/03/8/605c3d89-8668-4b7c-a785-1129dc76668d-flag-mys.png'
)
)
)
$title = 'POLISI HALAL'
$ext = 'jpg'
$filepath = 'https://www.dcschicken.com/img/view/files/fullsize/2023/12/5/657923b5-5080-43e1-99d7-041175359a77-ms-1500-page-0001.jpg'
$global_languages = array(
(int) 0 => array(
'id' => '1',
'code' => 'eng',
'icon' => '/2021/03/c/605c3cee-cb80-4b1f-a5fd-0f65dc76668d-flag-eng.png'
),
(int) 1 => array(
'id' => '2',
'code' => 'mys',
'icon' => '/2021/03/8/605c3d89-8668-4b7c-a785-1129dc76668d-flag-mys.png'
)
)
$content_type = 'image/jpeg'
$filename = 'polisi-halal'
$http_response_header = array(
(int) 0 => 'HTTP/1.1 404 Not Found',
(int) 1 => 'Date: Wed, 13 May 2026 11:57:56 GMT',
(int) 2 => 'Content-Type: text/html; charset=UTF-8',
(int) 3 => 'Connection: close',
(int) 4 => 'Server: cloudflare',
(int) 5 => 'x-powered-by: PHP/7.4.33',
(int) 6 => 'Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=65b9pMurLLpcpU5mPnLHBlvl6C1073bGVI%2B6gOc4uxaheKtWu7xxyv06%2FVMNws6sLOD1t1i60kbvPgPVzPjhHmYwQ9Y0UrzJp1OhUgSvr6hfgxyb8uYVilWDD%2B%2BvBYt%2Fby7sbuwwFal42mhiXuZU7uc%3D"}]}',
(int) 7 => 'Cache-Control: max-age=14400',
(int) 8 => 'cf-cache-status: EXPIRED',
(int) 9 => 'vary: accept-encoding',
(int) 10 => 'Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}',
(int) 11 => 'Server-Timing: cfCacheStatus;desc="EXPIRED"',
(int) 12 => 'Server-Timing: cfEdge;dur=14,cfOrigin;dur=299',
(int) 13 => 'CF-RAY: 9fb17d082d4cfce7-SIN',
(int) 14 => 'alt-svc: h3=":443"; ma=86400'
)readfile - [internal], line ??
include - APP/View/Pages/download.ctp, line 11
View::_evaluate() - CORE/Cake/View/View.php, line 971
View::_render() - CORE/Cake/View/View.php, line 933
View::render() - CORE/Cake/View/View.php, line 473
Controller::render() - APP/Controller/Controller.php, line 968
PagesController::certificate() - APP/Controller/PagesController.php, line 148
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - APP/Controller/Controller.php, line 499
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 117