Mobile app development for IPhone,Android, Blackberry and windows phones

Mobile software development for IPhone, Android, Blackberry

Mobile app development for IPhone,Android, Blackberry and windows phones More »

web design Coimbatore , web development Coimbatore | Suriyan Technologies

Website design, website development using Joomla, Wordpress, Drupal

web design Coimbatore , web development Coimbatore | Suriyan Technologies More »

Software development company Coimbatore Suriyan Technologies

Desktop application development

Software development company Coimbatore Suriyan Technologies More »

Joomla, Drupal, Wordpress based site development

Cutting Edge CMS site development

Joomla, Drupal, Wordpress based site development More »

 

Fixing Internet explorer Content-type and Content-Disposition issues using PHP

When you add download files option to your pages using PHP. you need to use following code to fix IE related issues

$filename = “myfile” . “.doc”;
header(‘Content-Type: application/msword’);
header(‘Expires: ‘ . gmdate(‘D, d M Y H:i:s’) . ‘GMT’);
header(‘Content-Disposition: attachment; filename=”‘ . $filename . ‘”‘);

if (strpos($_SERVER['HTTP_USER_AGENT'], ‘MSIE’)) {
header(‘Cache-Control: must-revalidate, post-check=0, pre-check=0′);
header(‘Pragma: public’);
} else {
header(‘Pragma: no-cache’);
}

August 10, 2010 suriyan