Reply to Re: global variables for class.upload.php

Re: global variables for class.upload.php new!
by colin, 9 years, 5 months ago
You can do it with simple PHP (not tested):
$options = array(
  'auto_create_dir' => FALSE,
  'file_max_size' => '5000000', 
  'mime_check' => TRUE, 
  'allowed' => array('image/jpeg','image/gif','image/png'),
  'no_script' => true, #güvenlik
  'image_resize' => true,
  'image_ratio_crop' => true,
  'file_auto_rename' => true, 
  'file_name_body_pre' => 'tt_'
);

$handle = new Upload($_FILES['resim']);
if ($handle->uploaded) {
  // assign the array values to the class properties
  foreach ($options as $key => $value) {
    $handle->$key = $value;
  }
}
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important