求php高手指点:
PHPWarning:session_start()[function.session-start]:open(C:\WINDOWS\TEMP\sess_eflvvv9i...
PHP Warning: session_start() [function.session-start]: open(C:\WINDOWS\TEMP\sess_eflvvv9irt8c0q02vkmgk44oa4, O_RDWR) failed: Permission denied (13) in F:\网站案例\gljy\function\safecode.php on line 6 PHP Warning: imagegif() [function.imagegif]: Unable to open temporary file in F:\网站案例\gljy\function\safecode.php on line 93 PHP Warning: Unknown: open(C:\WINDOWS\TEMP\sess_eflvvv9irt8c0q02vkmgk44oa4, O_RDWR) failed: Permission denied (13) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
这是什么错了 展开
这是什么错了 展开
1个回答
展开全部
//给你个下载文件的代码吧
$file_name = "要下载的文件名";
$file_dir = dirname(__FILE__)."/";
$file = fopen($file_dir . $file_name,"r"); //打开文件
//输入文件标签
header("Content-type: application/octet-stream");
header("Accept-Ranges: bytes");
header("Accept-Length: ".filesize($file_dir . $file_name));
header("Content-Disposition: attachment; filename=" . $file_name);
//输出文件内容
echo fread($file,filesize($file_dir . $file_name));
fclose($file);
$file_name = "要下载的文件名";
$file_dir = dirname(__FILE__)."/";
$file = fopen($file_dir . $file_name,"r"); //打开文件
//输入文件标签
header("Content-type: application/octet-stream");
header("Accept-Ranges: bytes");
header("Accept-Length: ".filesize($file_dir . $file_name));
header("Content-Disposition: attachment; filename=" . $file_name);
//输出文件内容
echo fread($file,filesize($file_dir . $file_name));
fclose($file);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询