dtpf76658 2016-08-01 13:19
浏览 18

使用PHP在我的个人云上删除图像

I'm working at a personal cloud where my gf can store her photos because her iCloud is full.

Basically, this is what is making everything works:

<?php
$dirname = "uploads/";
$images = glob($dirname."*.{jpg,,jpeg,png,gif,JPG,JPEG,PNG,GIF}", GLOB_BRACE);

usort($images, create_function('$b,$a', 'return filemtime($a) - filemtime($b);'));
foreach($images as $image) {

echo '
 <a href="'.$image.'">
 <img class="img-grid" src="'.$image.'" />
 </a>';
}

?>

And it looks like this.

It's working perfectly but she needs a tool for deleting already uploaded images. Assuming she is only using this site at her smartphone, i've planned 3 ways of doing this although I dont know how to do it.


1st: A "X" at every image for deleting

PROS: Easy for her // CONS: Touchscreen miss click


2nd: A table with all images retrieved from dir and 'delete' button

PROS: Probably the easiest for programming? // CONS: Ugly


3rd: An "image preview" with delete button when clicking

PROS: Beauty and useful // CONS: Probably weird for mobile


So, which one of the 3 can be a good solution for her and how to do it?

Thanks in advance!

Edit2: inserting "how to do it" Edit3: sorry bad english, 'm from BR land


  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度