解決中文亂碼解決方法有很多種,一種是對url編碼如urlencode方法,另一種是下面的header頭處理方法以binary方法。
<?php教程
$file_name = urlencode($_REQUEST['filename']);
header("Pragma: public"); header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header('Content-Type: application/vnd.ms-excel; charset=utf-8');
header("Content-Transfer-Encoding: binary");
header('Content-Disposition: attachment; filename='.$file_name);
echo strips教程lashes($_REQUEST['content']);
?>