note 11622 deleted from function.header by jimw

From: Date: Wed, 31 Oct 2001 21:53:08 +0000
Subject: note 11622 deleted from function.header by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19776@lists.php.net to get a copy of this message
if you make a download with the suggested header directives you won't be able to open the file directly (well not without clicking on open for 3 times) but would have to download it. here's what we did to make a csv-download without the disturbing 'do-you-want-to-open-or-save-the-file-dialogs': we added a line in the httpd.conf of the apache-server and made csv-files being processed by the php-module. add the following in the according virtual-host directive (or if you dare for the whole server). <VirtualHost your-ip-address> ServerName your-host-name DocumentRoot your-app-path # this is for the file downloads AddType application/x-httpd-php .csv </VirtualHost> then we renamed the php-file that generated the csv-content to 'download.csv' and made a link to it from another page

« previous php.notes (#19776) next »