note 85287 rejected from function.readfile by mgf

From: Date: Wed, 27 Aug 2008 12:15:04 +0000
Subject: note 85287 rejected from function.readfile by mgf
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-143869@lists.php.net to get a copy of this message
Note Submitter: cealtoca ---- My hosting server switched to php5 and now my download script doesn't work, just shows binary code of my file instead of download script: <?php $url = '/relative/path/'.$nombre2; header('Content-Description: File Transfer'); header('Content-Type: application/force-download'); header('Content-Length: ' . filesize($url)); header('Content-Disposition: attachment; filename=' . basename($url)); readfile($url); ?> Any ideas ?

« previous php.notes (#143869) next »