#1
  1. No Profile Picture
    Thistle
    Guest
    Devshed Newbie (0 - 499 posts)
    Hello !
    I've built a form for uploading a user file, it works for sure, and PHP3 is even telling the name of temporary file in specified directory - BUT there's no such file there! And I can't find it any where in the system. I'm using Apache 1.3 on Linux RH 6.0 Hedwig. So what could be a problem - please tell me.
    Thank you a priori!
    Yours,
    Thistle


    ------------------
    Sincerely yours,
    =Thistle=
  2. #2
  3. No Profile Picture
    Randy
    Guest
    Devshed Newbie (0 - 499 posts)
    Did you check the file upload location on the server to make sure the web server has permission to write to the directory?

    Also, wouldn't this message be more appropriate for the PHP forum? This is the Perl forum.



    [This message has been edited by Randy (edited 12-27-99).]
  4. #3
  5. No Profile Picture
    Tricord
    Guest
    Devshed Newbie (0 - 499 posts)
    Best is to move your file in a non-temp location after it's been uploaded... Something like with the following code...

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>if (!file_exists( "/destination_directory/$filename")) {
    copy($file, "/destination_directory/$filename");
    } else {
    echo( "I'm sorry but your file name is already in use, please try another.");
    unlink($file); //deletes the temp file if it cannot be copied to destination
    exit;
    }
    unlink($file); //deletes the temp file after a succesfull copy to the destination
    if (!file_exists( "/destination_directory/$filename")) {
    echo( "Sorry but your file did not upload for some reason, please try again."); //makes sure the file is actually there...
    exit;
    }[/quote]

    I hope this helps!

    -Tricord
    BELGIUM
    hostmaster@tricordnet.com

    [This message has been edited by Tricord (edited 12-28-99).]

IMN logo majestic logo threadwatch logo seochat tools logo