coolkbk585's advise also echoes "error", rogem002's code didn't echo anything. I also tried with the whole path to the new file (including the home or root folder).
I tried to create the folder by my self with the FTP client and set the permition to 777. Then I got success and the file was copied succesfully.
Interesting is that if I set the folder permition while creating the directory; mkdir("copy", 0777) - the permition actually isn't 777 but 755. So I tried to separate this process and executed:
PHP Code:
mkdir("copy"); chmod("copy", 0777); $ret_val = copy("test.txt", "copy/test.txt"); echo ( $ret_val ? "success" : "error" );
Permition actually was 777 but I still got the error and the file wasn't copied  .
Per FTP client created folder, the argument "user" in properties has value 6267 but programicaly created folder has 99 in the "user" argument. Maybe this could be the reason?
|