Page 1 of 1

error when trying to upload a file

Posted: Mon Mar 19, 2007 8:32 am
by mister
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


when im trying to upload a file i get this error message and i dont know why i think every thing is ok with my code there is the error and the the code

Code: Select all

Warning:  move_uploaded_file(3/New Text Document.txt) [function.move-uploaded-file]: failed to open stream: No such file or directory in /var/www/localhost/inside/addCustomerDocumentDone.php on line 31

Code: Select all

$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
  echo "<html>
            <head>
                <title>Create a task</title>
                <link rel='stylesheet' type='text/css' href='CRMstyle.css' />
            </head>
        <body>
            <h5>File is valid, and was successfully uploaded.</h5>
and this is my upload dir

Code: Select all

$uploaddir    = "/var/www/localhost/inside/customersdocs/";

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Mon Mar 19, 2007 11:50 am
by jabbaonthedais
Have you checked the folder permissions?