Browse Source

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
main
RealAngeleno 1 year ago
committed by -
parent
commit
84c8bebfb6
  1. 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('Pragma: no-cache'); // HTTP 1.0
header('Expires: 0'); // Proxies
header('Content-Type: ' . $fp['type']);
header('Content-Length: ' . $fp['bytes']);
$fstat = fstat($fp);
header('Content-Type: ' . mime_content_type($dir . $name));
header('Content-Length: ' . $fstat['size']);
// dump the picture and stop the script
fpassthru($fp);

Loading…
Cancel
Save