My site is on a shared server, no access to php.ini
and output buffering
is set as no value
.
I have also tried this .htacces
but no help (tried without third line as well):
1. <IfModule mod_php5.c>
2. php_flag output_buffering On
3. php_value output_buffering 8192
4. php_value output_handler mb_output_handler
5. </IfModule>
I actually need it as I want to call ob_start()
before a header location in middle of a PHP Page as it is sending me - Header already started error
.
Thanks in advance.
Also, if someone can help me with a javascript based script which autodownload an exe file on page load (Without any extra page pop up).
Script I am using is:
// <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
.
.
.
// Sending Mails and other stuff
if ($mail->send()) {
$alertSuccess = 1;
$alertMsg = "Your license has been sent succesfully.";
## Download Installer
$folder = "license";
$file = "Setupn.msi";
ob_start();
header("Content-disposition: attachment; filename=$file");
header("Content-type: application/octet-stream");
ob_clean();
flush();
readfile("$folder/$file");
}