小编use*_*331的帖子

如何在不覆盖目标文件的情况下复制文件?

我制作的剧本是.

<?php

$source_file = 'http://www.domain.tld/directory/img.png'; 
$dest_file = '/home/user/public_html/directory/directory/img.png'; 

copy($source_file, $dest_file);

?>
Run Code Online (Sandbox Code Playgroud)

每次脚本运行时,我都需要删除该图像并重新上载.我要么想要它是img1.png,img2.png,img3.png等等.或者img(日期,时间).png,img(日期,时间).png等.这是可能的,如果是的话,如何我这样做吗?

php file

3
推荐指数
1
解决办法
2814
查看次数

标签 统计

file ×1

php ×1