您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php隐藏实际地址的文件下载方法_PHP

2024/6/21 17:10:08发布22次查看
本文实例讲述了php隐藏实际地址的文件下载方法。分享给大家供大家参考。具体如下:
下面这段php代码可不透露实际的文件下载地址。
function download_document($filename,$path=,$mimetype=application/octet-stream){ header(cache-control: must-revalidate, post-check=0, pre-check=0); header(content-disposition: attachment; filename = $filename); header(content-length: . filesize($pathto . $filename)); header(content-type: $mimetype); echo file_get_contents($pathto . $filename);}
希望本文所述对大家的php程序设计有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product