Autor | Zpráva | ||
---|---|---|---|
Rernst Profil * |
#1 · Zasláno: 22. 4. 2012, 14:49:21
Nevíte někdo jak toto mam upravit, aby když $url bylo prázdné toto neproběhlo?
if ($type=="download"){ $bufferSize = 512 * 1024; // 512Kb per second ob_end_clean(); ignore_user_abort(true); $output = $url; $filename = $url; header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . basename($filename)); //header('Content-Length: ' . filesize($filename)); $resource = fopen($filename, 'rb'); while (!feof($resource)) { echo fread($resource, $bufferSize); flush(); //sleep(1); } fclose($resource); |
||
ShiraNai7 Profil |
#2 · Zasláno: 22. 4. 2012, 14:51:02
if ($type=="download" && !empty($url)){ |
||
SeparateSK Profil |
#3 · Zasláno: 22. 4. 2012, 14:51:18
doplň na začiatok:
if($url=="")exit(); |
||
Rernst Profil * |
#4 · Zasláno: 22. 4. 2012, 16:13:10
Díky :)
|
||
Časová prodleva: 14 let
|
0