Reply to global variables for class.upload.php

global variables for class.upload.php new!
by Taner Macit, 10 years ago
I want to use pre options of class.upload.php variables in the class. Becuse i repeat thiş setting in all of my upload pages and when i wan to make a little change i must change all of this variables , i need a solution that i can add this preoptions as a variable or as a function or _construct..
if ((isset($_POST['actionmanset']) ? $_POST['actionmanset'] : (isset($_GET['actionmanset']) ?   $_GET['actionmanset'] : '')) == 'manset') {
 $handle = new Upload($_FILES['resim']);
  if ($handle->uploaded) {
    
    //common variables i want to use start
    $handle->auto_create_dir  = FALSE;
    $handle->file_max_size = '5000000'; // 4mb
    $handle->mime_check    = TRUE; #Güvenlik
    $handle->allowed = array('image/jpeg','image/gif','image/png'); #Güvenlik Yalnız resim
    $handle->no_script = true; #güvenlik
    $handle->image_resize          = true;
    $handle->image_ratio_crop      = true;
    $handle->file_auto_rename = true; 
    $handle->file_name_body_pre = 'tt_';
    //common variables i want to use finish

    $handle->image_x               = 427;
    $handle->image_y               = 225;
    $handle->Process('../uploads/manset/');
    if ($handle->processed) { $mansetresmi=$handle->file_dst_name;}
  }
}

how can i keep this global variables to use again in all my pages.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