RE: [PHP] DOWNLOAD

From: Date: Tue, 21 Jan 2003 09:44:27 +0000
Subject: RE: [PHP] DOWNLOAD
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-132369@lists.php.net to get a copy of this message
Create a script that reads the contents of a file after sending headers eg: header("Content-type: text/plain"); header("Content-Disposition: attachment; filename=downloaded.txt"); readfile("downloaded.txt"); exit(); The downloaded.txt can be any file subject to sending the correct headers and IE and other browsers will pop up a download (save) window. See your mime.types file for headers for each file type. Timothy Hitchens (HiTCHO) Open Source Consulting e-mail: tim@hitcho.com.au > -----Original Message----- > From: Shaun van den Berg [mailto:shaun@novtel.co.za] > Sent: Tuesday, 21 January 2003 4:39 PM > To: php-general@lists.php.net > Subject: [PHP] DOWNLOAD > > > Hi , > > Im not sure if this can be done in PHP , i know PHP has > upload features ! Does it have download features , wat i mean > is the following : i want a link - click here to download - > when you click on it , the download dialog box must appear - > how do i do this ? > > Thanks > Shaun van den Berg > > -- > Novtel Consulting > Tel: +27 21 9822373 > Fax: +27 21 9815846 > Please visit our website: > www.novtel.co.za > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#132369) next »