Created
March 19, 2013 13:47
-
-
Save pkdavies/5196234 to your computer and use it in GitHub Desktop.
Zend-Framework force-download for IE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$userAgent = new Zend_Http_UserAgent(); | |
$device = $userAgent->getDevice(); | |
$browser = $device->getBrowser(); | |
if ($browser == "Internet Explorer") { | |
header("Content-Type: application/force-download"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the equivalent of the following for Zend: https://gist.github.com/pkdavies/1188847