View Single Post
  #3  
Old 09-06-2008, 12:57 PM
ironmine is offline ironmine
Registered User

Join Date: Sep 2008
Posts: 2

I just figured out something that works to allow files to be overwritten. It might be the wrong way to go about enabling that, if so would someone let me know? What I did was comment out two lines of code in the script, just look for the following and add the forward slashes as I did for two lines of code after the "Check if the file..." comment/note. Do this AFTER you change the variable that causes files to be written with random names to the one that specifies using the chosen name:

// Check if the file already exists on the server..
// } Elseif(file_exists($folder.$file_name[$i])) {

// $error.= "The file: ".$_FILES['file']['name'][$i]." exists on this server, please rename your file.<br />Your file(s) were <b>not</b> uploaded.<br />";

I don't know if this causes any security issues or whatever, but I'm using the script for private use so I'm not that concerned about secuirty...

ironmine
Reply With Quote