Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    TDi
    TDi is offline
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    move_upoaded_file issue

    hi there

    I am quite new to coding, and have ben struggeling with my upload script for hours now.

    I use the move_uploaded_file to move the file from tmp dir to where I want it, but I get this error:

    Warning: move_uploaded_file(/home/dir/public_html/info/) [function.move-uploaded-file]: failed to open stream: Is a directory in /home/dir/public_html/dir/admin/testscript.php on line 44

    Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpt5HLgF' to '/home/dir/public_html/info/' in /home/dir/public_html/dir/admin/testscript.php on line 44


    My code looks like this
    PHP Code:
                $uploadDir '/home/dir/public_html/info';
                
    $uploadFileName $_FILES['file']['name'];
                
    $uploadTmpFileName $_FILES['file']['tmp_name'];
                
    move_uploaded_file($uploadTmpFileName"$uploadDir/$UploadFileName"); //This is line 44 
    Last edited by TDi; 02-21-2010 at 10:12 PM.

  • #2
    TDi
    TDi is offline
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dooh error found

    $Upload
    vs
    $upload

    Sorry


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •