mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
fix issues with the banner script not working
PHP 7.4 Notice: Trying to access array offset on value of type resource in on line 13 Notice: Trying to access array offset on value of type resource in on line 14 Notice: fpassthru(): read of 8192 bytes failed with errno=21 Is a directory in on line 17
This commit is contained in:
parent
a69337e243
commit
f631b83fb1
5
b.php
5
b.php
@ -10,8 +10,9 @@ $fp = fopen($dir . $name, 'rb');
|
|||||||
header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1
|
header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1
|
||||||
header('Pragma: no-cache'); // HTTP 1.0
|
header('Pragma: no-cache'); // HTTP 1.0
|
||||||
header('Expires: 0'); // Proxies
|
header('Expires: 0'); // Proxies
|
||||||
header('Content-Type: ' . $fp['type']);
|
$fstat = fstat($fp);
|
||||||
header('Content-Length: ' . $fp['bytes']);
|
header('Content-Type: ' . mime_content_type($dir . $name));
|
||||||
|
header('Content-Length: ' . $fstat['size']);
|
||||||
|
|
||||||
// dump the picture and stop the script
|
// dump the picture and stop the script
|
||||||
fpassthru($fp);
|
fpassthru($fp);
|
||||||
|
Loading…
Reference in New Issue
Block a user