Re: problems using copy() and rename()




"mantrid" <ian.dandav@xxxxxxxxxx> wrote in message
news:%7o_g.143$76.75@xxxxxxxxxxxxxxxxxxxxxxx
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?


are you receiving any error if so what is it? Also if it is as it looks and
is a file that has been uploaded then why not use the move_uploaded_file()
function.


.



Relevant Pages

  • Re: problems using copy() and rename()
    ... The temp and target paths are valid as they echo ... but I cant get the copyfunction to work, or the rename() ... it checks that a file has been uploaded and returns negative if it cant find ... Ther is no error message it appears to work as my success message is ...
    (comp.lang.php)
  • Re: yet another bash question
    ... remove occurrences of a string at the start ... duplicate or empty filenames ... echo "you will prepend all filenames in pwd,"; ... nice rename feature that I use to rename photos. ...
    (Debian-User)
  • yet another bash question
    ... to rename the files, keeping the numerical part and coding something else in ... # any filenames, and replace it by another string, subject to avoiding ... echo "you will prepend all filenames in pwd,"; ...
    (Debian-User)
  • Re: Error Disabling Connection message
    ... You can also start in safemode and in your account rename catroot2 to ... echo This batch file will now try to remedy the error 0x800710D9. ... :: Rename all log files in the %SystemRoot%\Security folder ... :: Configure and start the Cryptographic service ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: problems using copy() and rename()
    ... The temp and target paths are valid as they echo ... $sql2 = "UPDATE questions SET ... I cant see it am I being completely thick and missing something obvious ...
    (comp.lang.php)