I'm trying to copy and unlink files on my apache server. I'm trying to doing this about 1 hour ago. I can't imagine what's the problem.
This is my source:
if (copy("users_ftp/".$user_ftp.'/'.$_REQUEST['name'],"uploaded/".$name_file)) {
chmod("users_ftp/".$user_ftp, 0777);
chmod("users_ftp/".$user_ftp.'/'.$_REQUEST['name'], 0777);
if(unlink("users_ftp/".$user_ftp.'/'.$_REQUEST['name']))
{
// success, do stuff
} else {
print('nem törölt fájl');
}
} else {
print('sikertelen copy');
}
I tried to use it like this:
copy("/var/www/virtual/tigyisolutions.hu/boxy/htdocs/users_ftp/".$user_ftp.'/'.$_REQUEST['name'],"/uploaded/".$name_file)
But same error.
This is the error:
Warning: copy(/uploaded/ftp_dir_collect.php): failed to open stream: No such file or directory in /var/www/virtual/tigyisolutions.hu/boxy/htdocs/upload.php on line 261
sikertelen copy
Warning: md5_file(uploaded/1782848509512876a6863a2-08-58-30.php): failed to open stream: No such file or directory in /var/www/virtual/tigyisolutions.hu/boxy/htdocs/upload.php on line 270
Warning: sha1_file(uploaded/1782848509512876a6863a2-08-58-30.php): failed to open stream: No such file or directory in /var/www/virtual/tigyisolutions.hu/boxy/htdocs/upload.php on line 271
It says no stream. But I verified that the file exists on my FTP. I used chmod 777
, but it's not working. What else can be wrong?