Skip to content

Instantly share code, notes, and snippets.

@mfkenson
Last active December 28, 2015 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfkenson/7480426 to your computer and use it in GitHub Desktop.
Save mfkenson/7480426 to your computer and use it in GitHub Desktop.
//var myWindow=window.open("http://hostname/index.php?action=download",'Download Log','width=200,height=100');
above not work
var myWindow=window.open("http://hostname/index.php?action=download",'Download_Log','width=200,height=100');
<?php
$logfile = file_get_contents("C:/log.txt", true);
header('Content-disposition: attachment; filename=log.txt');
header("Pragma: public"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
echo $logfile;
exit;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment