将现有文件从一个文件夹移动到另一个文件夹 [英] moving a existing file from one folder to another

查看:202
本文介绍了将现有文件从一个文件夹移动到另一个文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




假设我有一个名为atest.doc的文件,它位于目录www / directory1

但我要移动该文件使用php到www / directory2 /我该怎么做

i试过


move_uploaded_file()但它没有任何想法吗?

谢谢......



Lets say i have a file with the name atest.doc and its in the directory www/directory1
but i want to move that file using php to www/directory2/ how do i do this
i tried

move_uploaded_file() but it didn''t work any ideas?
Thanks...

推荐答案

Realtime写道:
Realtime wrote:

www / directory1但是我想用php移动那个文件
www / directory2 /我该怎么做我试过了

move_uploaded_file()但它没有任何想法?

谢谢......


Lets say i have a file with the name atest.doc and its in the directory
www/directory1 but i want to move that file using php to
www/directory2/ how do i do this i tried

move_uploaded_file() but it didn''t work any ideas?
Thanks...




用telnet(ssh)或ftp做。


文件没有(只是)上传,所以你不能用move_uploaded_file()移动它。


-

==================

删除英寸×"来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================



Do it with telnet (ssh) or ftp.

The file wasn''t (just) uploaded, so you can''t move it with move_uploaded_file().

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


我相信你需要重命名()。

You need rename(), I believe.


Coul也使用link()和unlink()

Coul also use link() and unlink()


这篇关于将现有文件从一个文件夹移动到另一个文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆