使用copy()和rename()的问题 [英] problems using copy() and rename()
问题描述
我试图移动文件但运气好
我的代码如下。临时路径和目标路径有效,因为它们正确地回显了
。但我无法使copy()函数工作,或者重命名()
函数
$ temp_path = $ tempdir。 basename($ uploadedfile [" name"] [$ x]);
echo" Target - "。$ target_path。" Temp - "。$ temp_path。"< br>" ;;
copy($ temp_path,$ target_path);
有没有人遇到过这个问题?
Ian
target_path =
targetdir。基名(
UploadedFile的["名称"]
Im trying to move a file but am having luck
my code is below. The temp and target paths are valid as they echo
correctly. but I cant get the copy() function to work, or the rename()
function
$target_path = $targetdir . basename($uploadedfile["name"][$x]);
$temp_path = $tempdir. basename($uploadedfile["name"][$x]);
echo "Target - ".$target_path." Temp - ".$temp_path."<br>";
copy($temp_path, $target_path);
has any one experienced this problem?
Ian
target_path =
targetdir . basename(
uploadedfile["name"]
这篇关于使用copy()和rename()的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!