<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Download Files with Zend Framework</title>
	<atom:link href="/2010/05/25/download-files-with-zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>/2010/05/25/download-files-with-zend-framework/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: Douglas</title>
		<link>/2010/05/25/download-files-with-zend-framework/comment-page-1/#comment-477711</link>
		<dc:creator><![CDATA[Douglas]]></dc:creator>
		<pubDate>Fri, 05 Jan 2018 14:36:01 +0000</pubDate>
		<guid isPermaLink="false">/?p=1571#comment-477711</guid>
		<description><![CDATA[Great!!]]></description>
		<content:encoded><![CDATA[<p>Great!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SUSHIL</title>
		<link>/2010/05/25/download-files-with-zend-framework/comment-page-1/#comment-226197</link>
		<dc:creator><![CDATA[SUSHIL]]></dc:creator>
		<pubDate>Sat, 20 Dec 2014 11:57:53 +0000</pubDate>
		<guid isPermaLink="false">/?p=1571#comment-226197</guid>
		<description><![CDATA[Hello sir i understand this code but how to create the download file controller  i have create a csv file dynamical and create  a simple download link but it is not work framework tell   this request  controller is not define .. so please sir give a solution this particular problem]]></description>
		<content:encoded><![CDATA[<p>Hello sir i understand this code but how to create the download file controller  i have create a csv file dynamical and create  a simple download link but it is not work framework tell   this request  controller is not define .. so please sir give a solution this particular problem</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>/2010/05/25/download-files-with-zend-framework/comment-page-1/#comment-18559</link>
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Mon, 18 Mar 2013 00:21:23 +0000</pubDate>
		<guid isPermaLink="false">/?p=1571#comment-18559</guid>
		<description><![CDATA[Great post, most helpful.]]></description>
		<content:encoded><![CDATA[<p>Great post, most helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Master B.</title>
		<link>/2010/05/25/download-files-with-zend-framework/comment-page-1/#comment-14364</link>
		<dc:creator><![CDATA[Master B.]]></dc:creator>
		<pubDate>Thu, 14 Jul 2011 11:29:53 +0000</pubDate>
		<guid isPermaLink="false">/?p=1571#comment-14364</guid>
		<description><![CDATA[@Jan there&#039;s a little bug, should be:
header(&#039;Content-Type: &#039;. $mtype);]]></description>
		<content:encoded><![CDATA[<p>@Jan there&#8217;s a little bug, should be:<br />
header(&#8216;Content-Type: &#8216;. $mtype);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary C</title>
		<link>/2010/05/25/download-files-with-zend-framework/comment-page-1/#comment-13464</link>
		<dc:creator><![CDATA[Gary C]]></dc:creator>
		<pubDate>Wed, 27 Oct 2010 01:10:18 +0000</pubDate>
		<guid isPermaLink="false">/?p=1571#comment-13464</guid>
		<description><![CDATA[I was wondering if I had to create a controller for that.
Thanks for clearing that up... :)

Good walk through.]]></description>
		<content:encoded><![CDATA[<p>I was wondering if I had to create a controller for that.<br />
Thanks for clearing that up&#8230; 🙂</p>
<p>Good walk through.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>/2010/05/25/download-files-with-zend-framework/comment-page-1/#comment-13357</link>
		<dc:creator><![CDATA[Jan]]></dc:creator>
		<pubDate>Fri, 03 Sep 2010 06:31:25 +0000</pubDate>
		<guid isPermaLink="false">/?p=1571#comment-13357</guid>
		<description><![CDATA[Yeah, great script. 
Perhabs you would add a automatic mime-type-detection?
&lt;pre lang=&quot;php&quot;&gt;
if ($file !== false) {
	$mtype = &#039;&#039;;
	$file_path = _fullUploadPath().$file-&gt;image();
	
	// magic_mime module installed?
	if (function_exists(&#039;mime_content_type&#039;)) {
		$mtype = mime_content_type($file_path);
	}
	// fileinfo module installed?
	else if (function_exists(&#039;finfo_file&#039;)) {
		$finfo = finfo_open(FILEINFO_MIME); // return mime type
		$mtype = finfo_file($finfo, $file_path);
		finfo_close($finfo); 
	}
}

header($mtype);
header(&#039;Content-Disposition: attachment; filename=&quot;&#039;.$file-&gt;image().&#039;&quot;&#039;);
readfile(_fullUploadPath().$file-&gt;image());
&lt;/pre&gt;

Regards Jan]]></description>
		<content:encoded><![CDATA[<p>Yeah, great script.<br />
Perhabs you would add a automatic mime-type-detection?</p>
<pre lang="php">
if ($file !== false) {
	$mtype = '';
	$file_path = _fullUploadPath().$file->image();
	
	// magic_mime module installed?
	if (function_exists('mime_content_type')) {
		$mtype = mime_content_type($file_path);
	}
	// fileinfo module installed?
	else if (function_exists('finfo_file')) {
		$finfo = finfo_open(FILEINFO_MIME); // return mime type
		$mtype = finfo_file($finfo, $file_path);
		finfo_close($finfo); 
	}
}

header($mtype);
header('Content-Disposition: attachment; filename="'.$file->image().'"');
readfile(_fullUploadPath().$file->image());
</pre>
<p>Regards Jan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theo</title>
		<link>/2010/05/25/download-files-with-zend-framework/comment-page-1/#comment-13311</link>
		<dc:creator><![CDATA[Theo]]></dc:creator>
		<pubDate>Fri, 06 Aug 2010 16:40:10 +0000</pubDate>
		<guid isPermaLink="false">/?p=1571#comment-13311</guid>
		<description><![CDATA[Great script, but I do I use it ?

And does it work in IE ?]]></description>
		<content:encoded><![CDATA[<p>Great script, but I do I use it ?</p>
<p>And does it work in IE ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
