紧急提问,请高手回答,斑竹劳心看看!! 你之前调用了header的缘故..... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?phpif ($downfile) { if (!@is_file($downfile)) echo"你要下的文件不存在"; $filename = basename($downfile); $filename_info = explode('.', $filename); $fileext = $filename_info[count($filename_info)-1]; header('Content-type: application/x-'.$fileext); header('Content-Disposition: attachment; filename='.$filename); //header('Content-Description: PHP3 Generated Data'); readfile($downfile); echo"你已经下载完"; }?>会不会执行呢? 1、下载文件的进度由浏览器的下载进度框表示。2、你最后输出的<script>alert('你要下载文件,文件已下载完毕!'); </script>被保存到了下载文件中,若是非文本文件则可能打不开了 1、下载文件的进度由浏览器的下载进度框表示。2、你最后输出的<script>alert('你要下载文件,文件已下载完毕!'); </script>被保存到了下载文件中,若是非文本文件则可能打不开了 果然被保存进来了!这样行吗?<?phpif ($downfile) { if (!@is_file($downfile)) echo"你要下的文件不存在"; $filename = basename($downfile); $filename_info = explode('.', $filename); $fileext = $filename_info[count($filename_info)-1]; header('Content-type: application/x-'.$fileext); header('Content-Disposition: attachment; filename='.$filename); //header('Content-Description: PHP3 Generated Data'); readfile($downfile); 几句数据库操作的语句; }?> 不行!header前不能输出到屏幕内容 回复人: okdw(零零发财) ( ) 信誉:100 不行!header前不能输出到屏幕内容我没有再header()前输出语句! <?phpif ($downfile) { if (!@is_file($downfile)) echo"你要下的文件不存在"; else { $filename = basename($downfile); $filename_info = explode('.', $filename); $fileext = $filename_info[count($filename_info)-1]; header('Content-type: application/x-'.$fileext); header('Content-Disposition: attachment; filename='.$filename); //header('Content-Description: PHP3 Generated Data'); readfile($downfile); 几句数据库操作的语句; }}?> <?phpif ($downfile) { if (!@is_file($downfile)) echo"你要下的文件不存在"; else { $filename = basename($downfile); $filename_info = explode('.', $filename); $fileext = $filename_info[count($filename_info)-1]; header('Content-type: application/x-'.$fileext); header('Content-Disposition: attachment; filename='.$filename); //header('Content-Description: PHP3 Generated Data'); readfile($downfile); 几句数据库操作的语句; }}?> xuzuning(唠叨):请将一下看不懂,你的改动!谢谢! <?phpif ($downfile) { if (!@is_file($downfile)) echo"你要下的文件不存在"; else { $filename = basename($downfile); $filename_info = explode('.', $filename); $fileext = $filename_info[count($filename_info)-1]; header('Content-type: application/x-'.$fileext); header('Content-Disposition: attachment; filename='.$filename); header('Content-Description: PHP3 Generated Data'); readfile($downfile); $q="INSERT INTO `dcms_temp_dispatch` ( `dispatch_id` , `user_id` , `dispatch_num` , `dis_time` ) VALUES ( '6', '1', '1', '0000-00-00 00:00:00' ); "; $sql->query($q); exit; }}?>这样数据库的操作中与执行了 不过:header('Content-Description: PHP3 Generated Data');这具有什么用? 正则表达式中怎么匹配换行符?在线等答案 菜鸟来问以下几个问题: 钻牛角尖,如果取得函数参数的原型. 问一下,这 ereg(";$",$str) 是什么意思? 怎样使php可以连接MySQL数据库? 求放火墙 asp里的一段代码如何用php实现? 请问怎么得到这样的个数值? php在线人数请教! 请问php 中 如何把多选结果插入mysql数据库中 高手请看啊,这事真是难做 如何格式化时间?
if ($downfile) {
if (!@is_file($downfile))
echo"你要下的文件不存在";
$filename = basename($downfile);
$filename_info = explode('.', $filename);
$fileext = $filename_info[count($filename_info)-1];
header('Content-type: application/x-'.$fileext);
header('Content-Disposition: attachment; filename='.$filename);
//header('Content-Description: PHP3 Generated Data');
readfile($downfile);
echo"你已经下载完";
}?>
会不会执行呢?
2、你最后输出的
<script>
alert('你要下载文件,文件已下载完毕!');
</script>
被保存到了下载文件中,若是非文本文件则可能打不开了
2、你最后输出的
<script>
alert('你要下载文件,文件已下载完毕!');
</script>
被保存到了下载文件中,若是非文本文件则可能打不开了
这样行吗?<?php
if ($downfile) {
if (!@is_file($downfile))
echo"你要下的文件不存在";
$filename = basename($downfile);
$filename_info = explode('.', $filename);
$fileext = $filename_info[count($filename_info)-1];
header('Content-type: application/x-'.$fileext);
header('Content-Disposition: attachment; filename='.$filename);
//header('Content-Description: PHP3 Generated Data');
readfile($downfile);
几句数据库操作的语句;
}?>
不行!header前不能输出到屏幕内容我没有再header()前输出语句!
if ($downfile) {
if (!@is_file($downfile))
echo"你要下的文件不存在";
else {
$filename = basename($downfile);
$filename_info = explode('.', $filename);
$fileext = $filename_info[count($filename_info)-1];
header('Content-type: application/x-'.$fileext);
header('Content-Disposition: attachment; filename='.$filename);
//header('Content-Description: PHP3 Generated Data');
readfile($downfile);
几句数据库操作的语句;
}
}
?>
if ($downfile) {
if (!@is_file($downfile))
echo"你要下的文件不存在";
else {
$filename = basename($downfile);
$filename_info = explode('.', $filename);
$fileext = $filename_info[count($filename_info)-1];
header('Content-type: application/x-'.$fileext);
header('Content-Disposition: attachment; filename='.$filename);
//header('Content-Description: PHP3 Generated Data');
readfile($downfile);
几句数据库操作的语句;
}
}
?>
请将一下看不懂,你的改动!
谢谢!
if ($downfile) {
if (!@is_file($downfile))
echo"你要下的文件不存在";
else {
$filename = basename($downfile);
$filename_info = explode('.', $filename);
$fileext = $filename_info[count($filename_info)-1];
header('Content-type: application/x-'.$fileext);
header('Content-Disposition: attachment; filename='.$filename);
header('Content-Description: PHP3 Generated Data');
readfile($downfile);
$q="INSERT INTO `dcms_temp_dispatch` ( `dispatch_id` , `user_id` , `dispatch_num` , `dis_time` )
VALUES (
'6', '1', '1', '0000-00-00 00:00:00'
);
";
$sql->query($q);
exit;
}
}
?>
这样数据库的操作中与执行了
header('Content-Description: PHP3 Generated Data');这具有什么用?