W3 Total Cache & PHP readfile function
-
Hi Frederick,
The following code snippet, from the PHP website(Example #1, under Examples), work as expected when the W3 Total Cache plugin is activated enabled or disabled, on a clean WordPress install:
<?php
$file = ‘monkey.gif’;if (file_exists($file)) {
header(‘Content-Description: File Transfer’);
header(‘Content-Type: application/octet-stream’);
header(‘Content-Disposition: attachment; filename=’.basename($file));
header(‘Content-Transfer-Encoding: binary’);
header(‘Expires: 0’);
header(‘Cache-Control: must-revalidate, post-check=0, pre-check=0’);
header(‘Pragma: public’);
header(‘Content-Length: ‘ . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
?>Hoping you may be able to shed some light on the situation.
- The topic ‘W3 Total Cache & PHP readfile function’ is closed to new replies.