什么函数能够把文件从一个目录下转移到另外一个目录下?

什么函数能够把文件从一个目录下转移到另外一个目录下?
---------------------------------------------------------------

 1   
 2$old_file = "ssss.txt";   
 3$new_file = "ssss/".$old_file;   
 4if (copy($old_file,$new_file)){   
 5echo "移动成功";   
 6unlink($old_file);   
 7}   
 8else {   
 9echo "移动失败";   
10}   

ssss 文件夹为与此程序同级!

---------------------------------------------------------------

文件所在的文件夹的属性中,安全选项加EveryOne 完全控制.
如果ls.htm文件为只读,系统,隐藏.只要其中的一项为真,都全出现上述错误.
你试试吧!

Published At
Categories with Web编程
comments powered by Disqus