php下载
复习一下下载有关的资料!
有关于调转:
一、windons的跳转是:location=“two.html”
二、js的跳转<script>window.location="two.html"</script>
......
下载需要要有头部信息!
eg:
demo.php
<?php header("Content-Type:text/html;charset=utf-8"); echo '<h1>wwwwwwwwwwwwww </h1>'; echo '<script>window.location="two.html"</script>'; echo "这是一个中国字";
down.php
<?php header("Content-Type:image/gif"); header('Content-Disposition: attachment; filename="logo3333.gif"'); header('Content-Length:'.filesize("logo.gif")); readfile("logo.gif");