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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    wrong parameter issue

    I have the following code:

    Code:
          move_uploaded_file($_FILES["file"]["tmp_name"],
          "upload/" . $prefix, $_FILES["file"]["name"]);
          echo "Stored in: " . "upload/" . $prefix, $_FILES["file"]["name"];
    $prefix is defined as $session->username;

    Code:
    $prefix = $session->username;
    and for some reason I keep getting the wrong parameter error no matter what i do. the only way to get rid of the error is to get rid of $prefix, but I need it there to add a prefix to the uploaded file.

    Warning: Wrong parameter count for move_uploaded_file() in /home/.interrogator/sfox8/graphytecomics/upload_file.php on line 28
    I'm really out of ideas now.

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    you have a , after $prefix when it should be a .
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com

  • #3
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    Quote Originally Posted by GJay View Post
    you have a , after $prefix when it should be a .
    Yep, both of them.

  • #4
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank you so much guys. I feel like an idiot for not noticing a problem that small.


  •  

    Posting Permissions

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