phpnoobie9 Posted March 6, 2008 Share Posted March 6, 2008 I've chmod the test folder to 777 I'm on centos 5 with cpanel. Line 20: if (move_uploaded_file ($_FILES['thefile']['tmp_... "/test/{$_FILES['thefile'... Warning: move_uploaded_file(/test/... [function.move-uploaded-f... failed to open stream: No such file or directory in /home/testsite/public_htm... on line 20 Warning: move_uploaded_file() [function.move-uploaded-f... Unable to move '/tmp/php6fLecj' to '/test/1.gif' in /home/testsite/public_htm... on line 20 Quote Link to comment Share on other sites More sharing options...
awpti Posted March 6, 2008 Share Posted March 6, 2008 You probably want to use something like this: if (move_uploaded_file ($_FILES['thefile']['tmp_... , $_SERVER['DOCUMENT_ROOT']."/test/{$_FILES['thefile'... Quote Link to comment Share on other sites More sharing options...
phpnoobie9 Posted March 7, 2008 Author Share Posted March 7, 2008 Found out that I needed to add the absolute path instead of just the '/test/' Fixed that and now it's working. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.