Skip to content

Commit

Permalink
fix issues with the banner script not working
Browse files Browse the repository at this point in the history
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
  • Loading branch information
RealAngeleno authored and ctrlcctrlv committed Mar 9, 2023
1 parent a69337e commit f631b83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions b.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
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);
Expand Down

0 comments on commit f631b83

Please sign in to comment.