public function __construct($extraConfig = array()) { parent::__construct($extraConfig); if ($this->config['options']['fileConnector']) { $this->connector_script_url = $this->config['options']['fileConnector']; } $fileRoot = $this->config['options']['fileRoot']; if ($fileRoot !== false) { // takes $_SERVER['DOCUMENT_ROOT'] as files root; "fileRoot" is a suffix if ($this->config['options']['serverRoot'] === true) { $this->doc_root = $_SERVER['DOCUMENT_ROOT']; $this->dynamic_fileroot = $fileRoot; $this->path_to_files = $_SERVER['DOCUMENT_ROOT'] . '/' . $fileRoot; } else { $this->doc_root = $fileRoot; $this->dynamic_fileroot = ''; $this->path_to_files = $fileRoot; } } else { $this->doc_root = $_SERVER['DOCUMENT_ROOT']; $this->path_to_files = $this->fm_path . '/' . $this->dynamic_fileroot; } $this->path_to_files = $this->cleanPath($this->path_to_files); $this->__log(__METHOD__ . ' $this->fm_path value ' . $this->fm_path); $this->__log(__METHOD__ . ' $this->path_to_files ' . $this->path_to_files); $this->__log(__METHOD__ . ' $this->doc_root value ' . $this->doc_root); $this->__log(__METHOD__ . ' $this->dynamic_fileroot value ' . $this->dynamic_fileroot); $this->setParams(); $this->setPermissions(); $this->availableLanguages(); $this->loadLanguageFile(); }
function deleteFile($file = '') { $file = $file ? $file : parent::getFilePath(); $file = "./up_files/" . $file; if (is_file($file)) { return @unlink($file); } else { return false; } }