DeveloperSide.NET Forums
May 26, 2020, 06:14:46 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
Author Topic: strange upload error  (Read 4717 times)
0 Members and 1 Guest are viewing this topic.
Jr. Member
Posts: 32

View Profile
« on: March 27, 2007, 02:40:33 PM »

When I upload a file (eg f00.jpg), and execute move_uploded file, it is moved to Apache\f00.jpg and NOT to the specified dir.

When I upload the same file again, it DOES move the file to the right directory.

In both cases move_uploaded_file returns 'true'.

It looks like the file is only placed in the proper directory when no fo file of that name exists in Apache\ (I tried that).

Looks like a bug.  Or?

   <form action="" method="POST" enctype="multipart/form-data">
   <input class="b" name="upload" type="file" size="40">&nbsp;&nbsp;
   <input class="b" type="submit" value="Upload">

and on upload:

   case $_FILES['upload']['name']=='':
      echo 'No file for upload!';
      return false;

       echo 'Move OK: '.$path.$fileSaveName; // debug
         return $fileSaveName;
       echo 'Move BAD'.$path.$fileSaveName; // debug
         return false;
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!