7 Replies - 2544 Views - Last Post: 13 December 2010 - 02:52 PM Rate Topic: -----

#1 Guest_Steve*


Reputation:

Help with multiple image upload script

Posted 13 December 2010 - 12:32 PM

Hi all,

Please can somebody help me with the following script.
I need it to upload user info into db and the images names/url, and upload the images to the server also.

It was working with one file uploads, but then i messed about with it without creating a back up and now i just get server 500 errors when i run it.

Thanks in Advance,
Steve

$required = array('customername'=>'Customer Name', 'town'=>'Town/City', 'testimonial'=>'Testimonial', 'sort_order'=>'Sort Order', 'images'=>'Images'); // required form field names and labels (used in validation logic)
$upload_name = 'images'; // the name of the upload field(s) $_FILES['images']
$imgdir = "uploaded_images/"; // destination folder
$image_types = array(IMG_GIF,IMG_JPG,IMG_PNG); // acceptable types returned by getimagesize()
$image_tmpname = $_FILES['images']['name'];
$imgname = $imgdir.$image_tmpname;

// form processing starts here - check if a form submitted to this code
if($_SERVER['REQUEST_METHOD'] == 'POST'){
   $errors = array(); // store any errors
   // check if the $_FILES array contains anything 
   // the following two if() tests assume that the form will always set at least one $_POST field ($_POST['submit'])
   if(empty($_FILES) && !empty($_POST)){
      // no $_FILES information but there is $_POST information
      $errors[] = 'No uploaded file information, either the form is invalid (no enctype or no file fields) or uploads are not enabled on this server!';
   }
   if(empty($_FILES) && empty($_POST)){
      // both are empty, the maximum post size was exceeded
      $errors[] = 'No uploaded file information, the total size of all post data and uploaded files exceeds the post_max_size setting!';
   }

  // validate the form data (customername, town, testimonial, sort_order, and at least one image are required)
         foreach($required as $key=>$value){
            // isset($_POST[$key]) && $_POST[$key] != '' complemented gives -> !isset($_POST[$key]) || $_POST[$key] == ''
            if(!isset($_POST[$key]) || $_POST[$key] == ''){
               $errors[] = "Form field: $value, is empty!";
            }
         }
         // add other validation tests here ...
         
         // validate the uploaded file(s), must be at least one that is of type gif, jpg, or png
         $upload_errors = array(UPLOAD_ERR_OK => 'There is no error, the file uploaded with success.',
                           UPLOAD_ERR_INI_SIZE => 'The file exceeds the upload_max_filesize directive!',
                           UPLOAD_ERR_FORM_SIZE => 'The file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!',
                           UPLOAD_ERR_PARTIAL => 'The file was only partially uploaded!',
                           UPLOAD_ERR_NO_FILE => 'No file was uploaded!',
                           UPLOAD_ERR_NO_TMP_DIR => 'Missing a temporary folder!',
                           UPLOAD_ERR_CANT_WRITE => 'Failed to write file to disk!',
                           UPLOAD_ERR_EXTENSION => 'A PHP extension stopped the file upload!');

         $num_images = 0; // count the number of valid images
		 
		 foreach ($_FILES["images"]["error"] as $key => $error) {    if ($error == UPLOAD_ERR_OK) {        $tmp_name = $_FILES["images"]["tmp_name"][$key];        $name = $_FILES["images"]["name"][$key];        move_uploaded_file($tmp_name, "data/$name");    }}

		 if(move_uploaded_file($_FILES['images']['tmp_name'], $imgname)){list($width,$height,$type,$attr)= getimagesize($imgname);
		 switch($type){ 
		 case 1:  $ext = ".gif"; break;
		  case 2:  $ext = ".jpg"; break;
		   case 3:  $ext = ".png"; break; default:
		      echo "Not acceptable format of image";}
		 
         foreach ($_FILES[$upload_name]["error"] as $key => $error){
            if ($error == UPLOAD_ERR_OK){
               // a file was successfully uploaded, check if an image and get the image data from it
               if(list($width,$height,$type,$attr)= getimagesize($_FILES[$upload_name]["tmp_name"][$key])){
                  // is an image, count it if it is allowed type
                  if(in_array($type,$image_types)){
                     $num_images++;
                  } else {
                     // wrong image type
                     $errors[] = "The uploaded file: {$_FILES[$upload_name]["name"][$key]}, is not a gif, jpg, or png type!";
                  }
               } else {
                  // not an image
                  $errors[] = "The uploaded file: {$_FILES[$upload_name]["name"][$key]}, is not an image file!";
               }
            } else {
               // upload error occurred. If error = 4, file form field was left empty and ignore the error
               if($error != 4){
                  $ul_error_message = isset($upload_errors[$error]) ? $upload_errors[$error] : "An unknown error";
                  $errors[] = "The uploaded file: {$_FILES[$upload_name]["name"][$key]}, failed because: $ul_error_message!";
               }
			}
         } // end foreach
         if(!$num_images){
            $errors[] = "No valid images were uploaded, you must upload one or more images!";
         }

         // Expected $_POST and $_FILES data exists, process the actual data
         if(empty($errors)){
            // verify the destination directory
            if(!is_dir($imgdir)){
               $errors[] = "The upload destination directory: $imgdir, does not exist";
            } else {
               // directory does exist, check permissions
               if(!is_writable($imgdir)){
                  $errors[] = "The upload destination directory: $imgdir, is not writable!";
               }
            }
            
            // destination directory exists and is writable
            if(empty($errors)){
               $query=sprintf("INSERT INTO testimonials (CustomerName, Town, Testimonial, SortOrder, Images)
                  VALUES
                  ('%s','%s','%s','%s','%s')",
                  mysql_real_escape_string($_POST['customername']),
                  mysql_real_escape_string($_POST['town']),
                  mysql_real_escape_string($_POST['testimonial']),
                  mysql_real_escape_string($_POST['sort_order']),
		  mysql_real_escape_string($_POST['images'])
                  );
               // execute query
			   echo $_POST['images'];
               if (!mysql_query($query,$con)){
                  // query failed
                  $errors[] = "The submitted data could not be inserted into the database due to a fatal error!";
                  trigger_error("Query: $query, failed: " . mysql_error($con));
               } else {
                  // query executed without error
                  if(mysql_affected_rows($con)){
                     // row was inserted, get the id
                     $last_id = sprintf("%05d",mysql_insert_id($con)); // get the id just used, pad to 6 places
                     foreach ($_FILES[$upload_name]["error"] as $key => $error){
                        if ($error == UPLOAD_ERR_OK){
                           // a file was successfully uploaded, check if an image and get the image data from it
                           if(list($width,$height,$type,$attr)= getimagesize($_FILES[$upload_name]["tmp_name"][$key])){
                              // is an image, process it if it is allowed type
                              if(in_array($type,$image_types)){
                                 // is an allowed image type
                                 $tmp_name = $_FILES[$upload_name]["tmp_name"][$key];
                                 $name = $_FILES[$upload_name]["name"][$key];
                                 $whole_name = $last_id . '_' . $name;
                                 if(!move_uploaded_file($tmp_name, "$imgdir$whole_name")){
                                    $errors[] = "The uploaded file: $name, could not be saved to: $imgdir$whole_name!";
                                 } else {
                                    echo "The uploaded file: $name, was saved to: $imgdir$whole_name<br />";
                                 }
                              }
                           }
                        }
                     } // end foreach
                     echo "<p align=center><b>1 testimonial added</b></p>";
                  } else {
                     // query failed to insert row
                     // the only way this branch can be reached is if the query executed without error but the row was not inserted
                     $errors[] = "The submitted data could not be inserted into the database due to a fatal error!";
                     trigger_error("Query: $sql, failed: " . mysql_error($con));                  
                  }
               }
            } // end of verify destination directory
         } // end of process the actual data
         mysql_close($con);
      } // end of validating form data
  // end of $_FILES/$_POST arrays contain data
   // display any errors that occurred during the processing of the form
   if(!empty($errors)){
      echo "The following errors occurred:<br />";
      foreach($errors as $error){
         echo "$error<br />";
      }
   }
 // end of request_method check

// display the form (always)
// if post values don't exist, give them default values here (doing this before the upload test would give incorrect results) to be used in the value="" attributes
$_POST['customername'] = isset($_POST['customername']) ? $_POST['customername'] : '';
$_POST['town'] = isset($_POST['town']) ? $_POST['town'] : '';
$_POST['testimonial'] = isset($_POST['testimonial']) ? $_POST['testimonial'] : '';
$_POST['sort_order'] = isset($_POST['sort_order']) ? $_POST['sort_order'] : '';
$_POST['images'] = isset($_POST['images']) ? $_POST['images'] : '';


?>

<form action="" method="post" enctype="multipart/form-data" name="add_test" id="add_test">
  <p>&nbsp;</p>
  <p align="center">
    <label for="customername">Customer Name:</label>
    <input name="customername" type="text" id="customername" maxlength="150" value="<?php echo $_POST['customername']; ?>" />
  </p>
  <p align="center">
    <label for="town">Town/City:   </label>
    <input name="town" type="text" id="town" maxlength="150" value="<?php echo $_POST['town']; ?>" />
  </p>
  <p align="center">
    <label for="testimonial"><u>Testimonial </u></label>
  </p>
  <p align="center">
    <textarea name="testimonial" id="testimonial" cols="60" rows="10"><?php echo $_POST['testimonial']; ?></textarea>
  </p>
  <p align="center">
    <label for="sort_order">Sort Order: </label>
    <input name="sort_order" type="text" id="sort_order" size="10" maxlength="3" value="<?php echo $_POST['sort_order']; ?>" />
  </p>
  <p align="center">  
   <input type="hidden" name="MAX_FILE_SIZE" value="500000" /> 
   <input type="file" name="images[]" /><br />
   <input type="file" name="images[]" /><br />
   <input type="file" name="images[]" /><br />
   <input type="file" name="images[]" /><br />
   <input type="file" name="images[]" />
  
  </p>

  <p align="center">
    <input type="submit" name="submit" id="submit" value="Submit" />
  </p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</form> 
</html>



MOD EDIT: Changed php tags to code tags.

:code:

Is This A Good Question/Topic? 0

Replies To: Help with multiple image upload script

#2 Stevis2002   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-December 10

Re: Help with multiple image upload script

Posted 13 December 2010 - 12:40 PM

I am a member now.......i was Guest_Steve....as posted above lol
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6259
  • View blog
  • Posts: 24,028
  • Joined: 23-August 08

Re: Help with multiple image upload script

Posted 13 December 2010 - 01:16 PM

Have you checked your PHP error logs?
Was This Post Helpful? 0
  • +
  • -

#4 Stevis2002   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-December 10

Re: Help with multiple image upload script

Posted 13 December 2010 - 01:32 PM

View PostJackOfAllTrades, on 13 December 2010 - 12:16 PM, said:

Have you checked your PHP error logs?



Just checked those, but they show nothing.

P.S Thanks for changing tags mod

View PostStevis2002, on 13 December 2010 - 12:30 PM, said:

View PostJackOfAllTrades, on 13 December 2010 - 12:16 PM, said:

Have you checked your PHP error logs?



Just checked those, but they show nothing.

P.S Thanks for changing tags mod



I have altered the script now to try and make it easier for myself to debug, but now it uploads everything except for the url/name to db and the image(s) to server

if(isset($_POST['submit']))  

{  

$customername = $_POST['customername'];  
$imagename = $_POST['imagename'];  
$testimonial = $_POST['testimonial']; 
$sort_order = $_POST['sortorder'];
$town = $_POST['town'];

$uploaddir = 'uploaded_images/';  

$uploadfile = $uploaddir . basename($_FILES['ipic1']['imagename']);  
    

echo($_FILES['ipic1']['type']);  
   
 move_uploaded_file($_FILES['ipic1']['tmp_name'], $uploadfile);     

$pic1 = $_FILES['ipic1']['imagename'];  


$uploaddir2 = 'uploaded_images/';  

$uploadfile2 = $uploaddir2 . basename($_FILES['ipic2']['imagename']);  
     

echo($_FILES['ipic2']['type']);  
 

move_uploaded_file($_FILES['ipic2']['tmp_name'], $uploadfile2);  
   

 $pic2 = $_FILES['ipic2']['imagename'];  


$uploaddir3 = 'uploaded_images/';  

 $uploadfile3 = $uploaddir3 . basename($_FILES['ipic3']['imagename']);  
   

 echo($_FILES['ipic3']['type']);  

  

 move_uploaded_file($_FILES['ipic3']['tmp_name'], $uploadfile3);  

  

 $pic3 = $_FILES['ipic3']['imagename'];  


$uploaddir4 = 'uploaded_images/';  

 $uploadfile4 = $uploaddir4 . basename($_FILES['ipic4']['imagename']);  
  

echo($_FILES['ipic4']['type']);  

   

 move_uploaded_file($_FILES['ipic4']['tmp_name'], $uploadfile4);  
   
 $pic4 = $_FILES['ipic4']['imagename'];  
 
 $uploaddir5 = 'uploaded_images/';  

 $uploadfile5 = $uploaddir5 . basename($_FILES['ipic5']['imagename']);  
  

echo($_FILES['ipic5']['type']);  

   

 move_uploaded_file($_FILES['ipic5']['tmp_name'], $uploadfile5);  
   
 $pic5 = $_FILES['ipic5']['imagename']; 
   
               $query=sprintf("INSERT INTO testimonials (CustomerName, Town, Testimonial, SortOrder, pic1, pic2, pic3, pic4, pic5)
                  VALUES
                  ('$customername','$town','&testimonial','$sort_order','$pic1','$pic2','$pic3','$pic4','$pic5')",
                  mysql_real_escape_string($_POST['customername']),
                  mysql_real_escape_string($_POST['town']),
                  mysql_real_escape_string($_POST['testimonial']),
                  mysql_real_escape_string($_POST['sort_order']),
				  mysql_real_escape_string($_POST['pic1']),
				  mysql_real_escape_string($_POST['pic2']),
				  mysql_real_escape_string($_POST['pic3']),
				  mysql_real_escape_string($_POST['pic4']),
				  mysql_real_escape_string($_POST['pic5'])
                  );

mysql_query($query) or die('Error, insert query failed, could not connect to database');  



 echo "New testimonial added  \n";  


 }  

?> 


<form action="" method="post" enctype="multipart/form-data" name="add_test" id="add_test">
  <p>&nbsp;</p>
  <p align="center">
    <label for="customername">Customer Name:</label>
    <input name="customername" type="text" id="customername" maxlength="150" value="<?php echo $_POST['customername']; ?>" />
  </p>
  <p align="center">
    <label for="town">Town/City:   </label>
    <input name="town" type="text" id="town" maxlength="150" value="<?php echo $_POST['town']; ?>" />
  </p>
  <p align="center">
    <label for="testimonial"><u>Testimonial </u></label>
  </p>
  <p align="center">
    <textarea name="testimonial" id="testimonial" cols="60" rows="10"><?php echo $_POST['testimonial']; ?></textarea>
  </p>
  <p align="center">
    <label for="sort_order">Sort Order: </label>
    <input name="sort_order" type="text" id="sort_order" size="10" maxlength="3" value="<?php echo $_POST['sort_order']; ?>" />
  </p>
  <p align="center">  
   <input type="hidden" name="MAX_FILE_SIZE" value="500000" /> 
   <input type="file" name="ipic1" /><br />
   <input type="file" name="ipic2" /><br />
   <input type="file" name="ipic3" /><br />
   <input type="file" name="ipic4" /><br />
   <input type="file" name="ipic5" />
  </p>

  <p align="center">
    <input type="submit" name="submit" id="submit" value="Submit" />
  </p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</form> 
</html>


Was This Post Helpful? 0
  • +
  • -

#5 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6259
  • View blog
  • Posts: 24,028
  • Joined: 23-August 08

Re: Help with multiple image upload script

Posted 13 December 2010 - 02:13 PM

Quote

now it uploads everything except for the url/name to db and the image(s) to server

I do not understand this sentence. I see nothing about urls in that code. This:

$uploadfile = $uploaddir . basename($_FILES['ipic1']['imagename']);  
    

echo($_FILES['ipic1']['type']);  
   
 move_uploaded_file($_FILES['ipic1']['tmp_name'], $uploadfile);     

$pic1 = $_FILES['ipic1']['imagename'];  


$uploaddir2 = 'uploaded_images/';  

$uploadfile2 = $uploaddir2 . basename($_FILES['ipic2']['imagename']);  
     

echo($_FILES['ipic2']['type']);  
 

move_uploaded_file($_FILES['ipic2']['tmp_name'], $uploadfile2);  
   

 $pic2 = $_FILES['ipic2']['imagename'];  


$uploaddir3 = 'uploaded_images/';  

 $uploadfile3 = $uploaddir3 . basename($_FILES['ipic3']['imagename']);  
   

 echo($_FILES['ipic3']['type']);  

  

 move_uploaded_file($_FILES['ipic3']['tmp_name'], $uploadfile3);  

  

 $pic3 = $_FILES['ipic3']['imagename'];  


$uploaddir4 = 'uploaded_images/';  

 $uploadfile4 = $uploaddir4 . basename($_FILES['ipic4']['imagename']);  
  

echo($_FILES['ipic4']['type']);  

   

 move_uploaded_file($_FILES['ipic4']['tmp_name'], $uploadfile4);  
   
 $pic4 = $_FILES['ipic4']['imagename'];  
 
 $uploaddir5 = 'uploaded_images/';  

 $uploadfile5 = $uploaddir5 . basename($_FILES['ipic5']['imagename']);  
  

echo($_FILES['ipic5']['type']);  

   

 move_uploaded_file($_FILES['ipic5']['tmp_name'], $uploadfile5);  
   
 $pic5 = $_FILES['ipic5']['imagename']; 



screams out to me to use an array and a loop. And why do you need multiple $uploadDir variables when they are all the same? Just define a constant at the start:

define('UPLOAD_DIR', 'uploaded_images/');

then

$uploadfile5 = UPLOAD_DIR . basename($_FILES['ipic5']['imagename']);


Do these POST variables exist?
mysql_real_escape_string($_POST['pic1']),
mysql_real_escape_string($_POST['pic2']),
mysql_real_escape_string($_POST['pic3']),
mysql_real_escape_string($_POST['pic4']),
mysql_real_escape_string($_POST['pic5'])


Was This Post Helpful? 0
  • +
  • -

#6 Stevis2002   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-December 10

Re: Help with multiple image upload script

Posted 13 December 2010 - 02:25 PM

Thanks for the help with the define.
I have changed it to how i think it should be then, $_FILES instead of $_POST for the image fields, but still no images getting into folder on server, or image names into database fields

if(isset($_POST['submit']))  

{  
define('UPLOAD_DIR', 'uploaded_images/');
$customername = $_POST['customername'];  
$imagename = $_POST['imagename'];  
$testimonial = $_POST['testimonial']; 
$sort_order = $_POST['sortorder'];
$town = $_POST['town'];

$uploadfile = 'UPLOAD_DIR' . basename($_FILES['ipic1']['imagename']);  

echo($_FILES['ipic1']['type']);  
   
 move_uploaded_file($_FILES['ipic1']['tmp_name'], $uploadfile);     

// $pic1 = $_FILES['ipic1']['imagename'];  
$pic1 = ($_FILES['ipic1']['imagename']);

$uploaddir2 = 'uploaded_images/';  

$uploadfile2 = 'UPLOAD_DIR' . basename($_FILES['ipic2']['imagename']);  
     

echo($_FILES['ipic2']['type']);  
 

move_uploaded_file($_FILES['ipic2']['tmp_name'], $uploadfile2);  
   

 $pic2 = ($_FILES['ipic2']['imagename']);  


$uploaddir3 = 'uploaded_images/';  

 $uploadfile3 = 'UPLOAD_DIR' . basename($_FILES['ipic3']['imagename']);  
   

 echo($_FILES['ipic3']['type']);  

  

 move_uploaded_file($_FILES['ipic3']['tmp_name'], $uploadfile3);  

  

 $pic3 = ($_FILES['ipic3']['imagename']);  


$uploaddir4 = 'uploaded_images/';  

 $uploadfile4 = 'UPLOAD_DIR' . basename($_FILES['ipic4']['imagename']);  
  

echo($_FILES['ipic4']['type']);  

   

 move_uploaded_file($_FILES['ipic4']['tmp_name'], $uploadfile4);  
   
 $pic4 = ($_FILES['ipic4']['imagename']);  
 
 $uploaddir5 = 'uploaded_images/';  

 $uploadfile5 = 'UPLOAD_DIR' . basename($_FILES['ipic5']['imagename']);  
  

echo($_FILES['ipic5']['type']);  

   

 move_uploaded_file($_FILES['ipic5']['tmp_name'], $uploadfile5);  
   
 $pic5 = ($_FILES['ipic5']['imagename']); 
   
               $query=sprintf("INSERT INTO testimonials (CustomerName, Town, Testimonial, SortOrder, pic1, pic2, pic3, pic4, pic5)
                  VALUES
                  ('$customername','$town','%s','$sort_order','$pic1','$pic2','$pic3','$pic4','$pic5')",
                  mysql_real_escape_string($_POST['customername']),
                  mysql_real_escape_string($_POST['town']),
                  mysql_real_escape_string($_POST['testimonial']),
                  mysql_real_escape_string($_POST['sort_order']),
				  mysql_real_escape_string($_FILES['pic1']),
				  mysql_real_escape_string($_FILES['pic2']),
				  mysql_real_escape_string($_FILES['pic3']),
				  mysql_real_escape_string($_FILES['pic4']),
				  mysql_real_escape_string($_FILES['pic5'])
                  );

mysql_query($query) or die('Error, insert query failed, could not connect to database');  

 echo "New testimonial added  \n";

 }  

?> 

<form action="" method="post" enctype="multipart/form-data" name="add_test" id="add_test">
  <p>&nbsp;</p>
  <p align="center">
    <label for="customername">Customer Name:</label>
    <input name="customername" type="text" id="customername" maxlength="150" value="<?php echo $_POST['customername']; ?>" />
  </p>
  <p align="center">
    <label for="town">Town/City:   </label>
    <input name="town" type="text" id="town" maxlength="150" value="<?php echo $_POST['town']; ?>" />
  </p>
  <p align="center">
    <label for="testimonial"><u>Testimonial </u></label>
  </p>
  <p align="center">
    <textarea name="testimonial" id="testimonial" cols="60" rows="10"><?php echo $_POST['testimonial']; ?></textarea>
  </p>
  <p align="center">
    <label for="sort_order">Sort Order: </label>
    <input name="sort_order" type="text" id="sort_order" size="10" maxlength="3" value="<?php echo $_POST['sort_order']; ?>" />
  </p>
  <p align="center">  
   <input type="hidden" name="MAX_FILE_SIZE" value="500000" /> 
   <input type="file" name="ipic1" /><br />
   <input type="file" name="ipic2" /><br />
   <input type="file" name="ipic3" /><br />
   <input type="file" name="ipic4" /><br />
   <input type="file" name="ipic5" />
  </p>

  <p align="center">
    <input type="submit" name="submit" id="submit" value="Submit" />
  </p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</form> 
</html>


Was This Post Helpful? 0
  • +
  • -

#7 JaKWaC   User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 234
  • Joined: 15-November 10

Re: Help with multiple image upload script

Posted 13 December 2010 - 02:40 PM

Is your uploaded_images directory writable? Also you should really check out the sprintf statment.
Was This Post Helpful? 0
  • +
  • -

#8 Stevis2002   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-December 10

Re: Help with multiple image upload script

Posted 13 December 2010 - 02:52 PM

View PostJaKWaC, on 13 December 2010 - 01:40 PM, said:

Is your uploaded_images directory writable? Also you should really check out the sprintf statment.

Ok, uploaded_images directory is writeable, and i have changed the sprintf statement...thanks for that, i had to change the sortorder to sort_order, but still no luck with uploads.

I think my 'UPLOAD_DIR' define is wrong though because it creates a file on my server named UPLOAD_DIR lol
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1