By: sylvain
Date: 2006-08-21
Time: 12:45
|
Firefox and mime troubles with tbsooo?
Hi, I am starting to use tbsooo, and it looks like there are issues to open the sxw file generated by tbsooo with Firefox. Even on the tbsooo web page, Firefox tries to open the results on the exemples section as php files. It works fine with IE, but... It looks like the issue is coming from the mime type setting. Any solution? Thanks in advance
Sylvain
|
By: sylvain
Date: 2006-08-21
Time: 14:01
|
Re: Firefox and mime troubles with tbsooo?
Well, it seems that I've found the solution. Just add the following line to the header information:
header("Content-Disposition: inline; filename=\"".$OOo->GetPathnameDoc()."\"");
And it works... Unless there is another suggestion
Sylvain
|
By: Olivier Loynet
Date: 2006-08-22
Time: 09:30
|
Re: Firefox and mime troubles with tbsooo?
Bonjour,
Voici un exemple de mon code que j'utilise
// file_name : le nom du fichier apparaissant pour l'utilisateur
if (file_exists($OOo->GetPathnameDoc()) && filesize($OOo->GetPathnameDoc()) > 0) {
header('Pragma: public');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: pre-check=0, post-check=0, max-age=0');
header('Content-Transfer-Encoding: none');
header('Content-type: '.$OOo->GetMimetypeDoc());
header('Content-Length: '.filesize($OOo->GetPathnameDoc()));
header('Content-Disposition: attachment; filename="'.$file_name.'"');
$OOo->FlushDoc();
// suppression du fichier
$OOo->RemoveDoc();
} else {
echo 'Document inexistant';
exit;
}
|
Olivier
|
|
Posting in progress.
Please wait...
|