my code works fine in WAMP server without any warning. But when I upload same code on my server it shows me these arror.
[function.move-uploaded-file]: failed to open stream: No such file or directory
my php file contain following line. $ran is random name generated by system. I want file name hidden, so I kept random function for that.
move_uploaded_file($_FILES['file']['tmp_name'], "users/jagdish/".$ran);
I also tried full path "/home/user/public_html/" instead of giving only "users/".
There are two errors. My upload.php is located at /public_html/jagdish/upload/upload.php
Warning: move_uploaded_file(/home/noyosdzy/public_html/jagdish/upload/users/jagdish/d406235ed72be6c41dbe2c00798a6e86fc28510f1359788762) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/noyosdzy/public_html/jagdish/upload/upload.php on line 118
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php3ww2M8' to '/home/noyosdzy/public_html/jagdish/upload/users/jagdish/d406235ed72be6c41dbe2c00798a6e86fc28510f1359788762' in /home/noyosdzy/public_html/jagdish/upload/upload.php on line 118
I tried different combinations also. But doesn't work. It works perfectly on WAMP. But not working on my web server.
/home/noyosdzy/public_html/jagdish/upload/users/jagdish/
already exist? – Barmar