hi
i have piece of php code that i need help to modify, its a http header status control for download page
// Stream the file to the end user.
header("Content-Type: $mediaType");
header('HTTP2-Settings: HTTP2-Settings: xxxxxxx ');
header('Content-Length: ' . filesize($filePath));
//header('Content-Disposition: ' . ($inline ? 'inline' : 'attachment') . "; filename=\"$fileName\"");
i need to add header link rel canonical for current url (dynamic download page url)
// Stream the file to the end user.
header("Content-Type: $mediaType");
header('link: < https://example.com<?php echo ($_SERVER['REQUEST_URI']); ?>>; rel="canonical"');
header('HTTP2-Settings: HTTP2-Settings: xxxxxxx ');
header('Content-Length: ' . filesize($filePath));
//header('Content-Disposition: ' . ($inline ? 'inline' : 'attachment') . "; filename=\"$fileName\"");
but it doesnt work, it gave me
Parse error: syntax error, unexpected 'REQUEST_URI' (T_STRING) in xxx on line 260
can someone help me?
thank you