/** * Constructor activating the default information of the class * * @access protected */ function __construct($config = array()) { parent::__construct($config); $safe_mode = false; // check for safe mode if (function_exists('ini_get')) { $safe_mode = ini_get('safe_mode'); // assume safe mode if can't check ini } else { $safe_mode = true; } $this->setProperties(array('local' => true, 'upload' => array('stream' => false, 'unique_filenames' => true))); }
/** * Constructor activating the default information of the class * * @access protected */ function __construct($config = array()) { parent::__construct($config); $safe_mode = false; // check for safe mode if (function_exists('ini_get')) { $safe_mode = ini_get('safe_mode'); // assume safe mode if can't check ini } else { $safe_mode = true; } $chunking = true; // no chunking in safe_mode or FTP mode or if base dir not writable if ($safe_mode || $this->isFTP() || !is_writable($this->getBaseDir())) { $chunking = false; } $this->setProperties(array('local' => true, 'upload' => array('stream' => false, 'chunking' => $chunking, 'unique_filenames' => true))); }