直接上代码啦..
- "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- "http://www.w3.org/1999/xhtml" lang="zh-cn">
- "Content-Type" content="text/html; charset=UTF-8" />
- "Content-Language" content="UTF-8" />
- "url" size="20" />
- "submit" type="submit" />
- set_time_limit (24 * 60 * 60);
- if (!isset($_POST['submit'])) die();
- $destination_folder = './downfolde/'; // 文件夹保存下载文件。必须以斜杠结尾
- $url = $_POST['url'];
- $newfname = $destination_folder . basename($url);
- $file = fopen ($url, "rb");
- if ($file) {
- $newf = fopen ($newfname, "wb");
- if ($newf)
- while(!feof($file)) {
- fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
- }
- }
- if ($file) {
- fclose($file);
- }
- if ($newf) {
- fclose($newf);
- }
- ?>
关键词标签:服务器 指定 文件夹 保
相关阅读
热门文章
plsql developer怎么连接数据库-plsql developer连接数据库方法
2021年最好用的10款php开发工具推荐
php利用淘宝IP库获取用户ip地理位置
在 PHP 中使用命令行工具
人气排行 详解ucenter原理及第三方应用程序整合思路、方法 plsql developer怎么连接数据库-plsql developer连接数据库方法 PHP中防止SQL注入攻击 PHP会话Session的具体使用方法解析 PHP运行出现Notice : Use of undefined constant 的解决办法 PHP如何清空mySQL数据库 CakePHP程序员必须知道的21条技巧 PHP采集图片实例(PHP采集)
查看所有0条评论>>