note 115948 added to function.readfile

From: Date: Sat, 18 Oct 2014 00:18:18 +0000
Subject: note 115948 added to function.readfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-200674@lists.php.net to get a copy of this message
<form action = "open.php" method = "post" > <input ="text" name ="brian" > <input type = "submit" name = "download" value = "download"> </form> <?php if(isset($_POST['download'])) { $img ='img'; $pic = '\marcus2'; $fad = 'pdf'; $file = $img.''. $pic .'.'. $fad; echo $file; 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; } } ?> ---- Server IP: 72.52.91.14 Probable Submitter: 76.3.32.27 ---- Manual Page -- http://php.net/manual/en/function.readfile.php Edit -- https://master.php.net/note/edit/115948 Del: integrated -- https://master.php.net/note/delete/115948/integrated Del: useless -- https://master.php.net/note/delete/115948/useless Del: bad code -- https://master.php.net/note/delete/115948/bad+code Del: spam -- https://master.php.net/note/delete/115948/spam Del: non-english -- https://master.php.net/note/delete/115948/non-english Del: in docs -- https://master.php.net/note/delete/115948/in+docs Del: other reasons-- https://master.php.net/note/delete/115948 Reject -- https://master.php.net/note/reject/115948 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200674) next »