C
|
carlos.oschi@gmail.com 11/29/2018 |
my friend, i do this simply using a command on javascript post event (after the php server) Using PHPRunner and Page Designer to Add button that will allow me to download a file from the Linux server. Determined that file exists and that the filesize is correct. Only the Server Button properties have PHP code as shown below: -------------------------------------------------- $file = 'c:\users\lt5923\EPC_input.txt'; if (file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($file).'"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); readfile($file); exit; } ---------------------------------------- When I click the button the system hangs without downloading file or giving me option to Open/Save file. Was expecting to download files using a button and the PHP code above. |