fix: add ob_clean and flush

This commit is contained in:
vnmedeiros 2024-11-05 10:35:16 -03:00 committed by mateuswetah
parent 16764f6c6c
commit b9b34f6a14
2 changed files with 4 additions and 0 deletions

View File

@ -454,6 +454,8 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
$filepath = $logs_folder . '/' . $filename; $filepath = $logs_folder . '/' . $filename;
\ob_clean();
\flush();
file_put_contents($filepath, $this->recursive_stingify_log_array($log), FILE_APPEND); file_put_contents($filepath, $this->recursive_stingify_log_array($log), FILE_APPEND);
//$fh = fopen($filepath, 'a'); //$fh = fopen($filepath, 'a');

View File

@ -244,6 +244,8 @@ class Private_Files {
// header('Cache-Control: must-revalidate'); // header('Cache-Control: must-revalidate');
// header('Pragma: public'); // header('Pragma: public');
// header('Content-Length: ' . filesize($file)); // header('Content-Length: ' . filesize($file));
\ob_clean();
\flush();
\readfile($existing_file); \readfile($existing_file);
die; die;