【发布时间】:2015-01-20 15:10:09
【问题描述】:
是否可以/容易地将文件从一个地方(比如/mypage/homes/ 中的index.php)复制到另一个文件夹中的文件夹(例如,在friends 中可能有pfox、sam、@ 987654326@) 使用 PHP?
那么文件index.php会被复制到friends/pfox、friends/uni等等?
很明显,文件结构是这样的:
update.php (The file you have to write)
mypage
|_homes
|_index.php
friends
|_pfox <--Copy index.php to here!
|_sam <--And here!
|_uni <--And here!
【问题讨论】:
-
如果
/friends/one/sub目录存在怎么办?是否也需要将其放入每个子文件夹中? -
为什么需要复制php文件?也许一些重定向到第一个会更好?
标签: php file-io directory copy