php怎么转向一个服务器端的文件

WBOY
Release: 2016-06-13 13:45:19
Original
883 people have browsed it

php如何转向一个服务器端的文件
比如一个目录下存在文件a.zip
当打开b.php时,就直接弹出下载a.zip,不是读a.zip再以流的形的输出,而是直接
文件的路径
http://www.xx.com/a.zip



------解决方案--------------------
header
------解决方案--------------------

PHP code

header('Location: http://www.xx.com/a.zip'); <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!