php 点击下载文件链接 直接下载 不是跳转到一个下载页面后在下载 phpcms v9 现在是这样的问题 点击一个下载文件的链接 先是跳转到一个下载页面 然后点击下载 我想把中间这一步省了 直接下载 查了网上有说 在phpcms v9 后台的模型管理 下载字段 更改 是否直接下载 还是函数获取地址 我改了还是不好用 求原因 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果你会php 的话 把连接指向 另一个PHP文件 这个文件写下载路径<? $file = '用户下载的真实文件地址.zip';if ( file_exists ( $file )) { header ( 'Content-Description: File Transfer' ); header ( 'Content-Type: application/octet-stream' ); header ( 'Content-Disposition: attachment; filename=' . basename ( $file )); header ( 'Content-Transfer-Encoding: binary' ); header ( 'Expires: 0' ); header ( 'Cache-Control: must-revalidate' ); header ( 'Pragma: public' ); header ( 'Content-Length: ' . filesize ( $file )); ob_clean (); flush (); readfile ( $file ); exit;}?> 那你在下载url a标记加上 target="_blank"就会跳转到新的页面下载。 php 中的数据库问题 PHP 加好友怎么写?? php方法调用 这段代码哪里错了 请问file_get_contents文件最大取入值 有关PHP网页不能分页,请高手看看 各位,想学习PHP从哪里开始呢? (散分!!!~ 正规表达式求助! 一个有点难度的问题;怎样用PHP实现象windows的帮助文档内的索引查询功能(输入某字符后自动显示关于该字的项目) 请问各位大侠,static函数是什么意思. 请教一个plupload 多实例的问题 PHP页面运行90秒左右自动停止(服务器win2008+IIS7+mysql)
<?
$file = '用户下载的真实文件地址.zip';if ( file_exists ( $file )) { header ( 'Content-Description: File Transfer' ); header ( 'Content-Type: application/octet-stream' ); header ( 'Content-Disposition: attachment; filename=' . basename ( $file )); header ( 'Content-Transfer-Encoding: binary' ); header ( 'Expires: 0' ); header ( 'Cache-Control: must-revalidate' ); header ( 'Pragma: public' ); header ( 'Content-Length: ' . filesize ( $file )); ob_clean (); flush (); readfile ( $file ); exit;}?>