php download pictures
来源:互联网 发布:台湾衰落知乎 编辑:程序博客网 时间:2024/05/16 12:03
<?php
include "../config/test.php";
$books = new Database($db_books);
$sql = "select pic from books ";
$data = $books->fetch_rows($sql);
foreach($data as $img) {
$img = $img['pic'];
$contents = file_get_contents($img);
$index = strpos($img, "?");
echo "index : ". $index . PHP_EOL;
if($index) {
$filename = substr($img, 0, $index);
}
$pic = APP_ROOT . '/images/' . array_pop(explode("/", $filename));
file_put_contents($pic, $contents);
echo $pic . " download finished " . PHP_EOL;
}
0 0
- php download pictures
- pictures
- Pictures
- php download 语句
- PHP - Manual手册 - Download下载
- PHP - Manual手册 - Download下载
- php error when download files
- Pictures Test
- my pictures
- joking pictures
- download
- download
- download
- download
- Download
- download
- download
- download
- 凯撒密码
- WinForm支持拖拽效果
- Xcode 常用快捷键
- mysql密码忘记解决办法
- POJ 2584 T-Shirt Gumbo(网络流之最大流)
- php download pictures
- Python 的内存管理
- 双边滤波器的原理及实现
- 终于把 VIJOS 源代码调试好了
- pwd
- Hibernate笔记(2)
- POJ 3437 Tree Grafting
- SGU 548
- IT忍者神龟之XHTML教程