Home >Backend Development >PHP Tutorial >php怎么转向一个服务器端的文件

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

WBOY
WBOYOriginal
2016-06-13 10:08:47888browse

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>
Statement:
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