Skip to content

Instantly share code, notes, and snippets.

Avatar
🇭🇰
Code for freedom. Stand with Hong Kong.

Kenson Leung W.K mfkenson

🇭🇰
Code for freedom. Stand with Hong Kong.
View GitHub Profile
View php ie force download.note
//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");
@mfkenson
mfkenson / php.ini
Last active Dec 25, 2015
php.ini for Windows 2008 R2 Server , PHP 5.3.23, for SugarCRM Professional 6.5.14.
View php.ini
#Windows 2008 R2 Server , PHP 5.3.23, for SugarCRM Professional 6.5.14
date.timezone ="UTC"
session.cookie_lifetime= 0 #expire the user cookie session (client-side) when the browser is closed
session.gc_maxlifetime= 600 #expire the user session (server-side) in 10 minutes
fastcgi.logging = 0
display_errors = 0
max_execution_time = 120