| Re: Определенный chmod в upload.class |
| by Hermit on 2003/4/27 22:38:55 Дурной, совсем дурной... function copyFile() { $ext = preg_replace("/^.+\.([^.]+)$/sU", "\\1", $this->HTTP_POST_FILES[$this->uploadFieldName]['name']); $func = function_exists(move_uploaded_file) ? move_uploaded_file : copy; chmod ($this->uploadFile, 0666); return $func($this->uploadFile, $this->uploadPath . "/" . $this->destinationFileName.".".strtolower($ext)); } |
| Определенный chmod в upload.class |
| by Hermit on 2003/4/27 22:28:55 Пытаюсь насильно прописать в upload.class.php чтобы при закачке файлов определенный (666) чмод проставлялся (а то закачиваются с 600). Есть там такая функция: function copyFile() // TODO check for is_writeable() { $ext = preg_replace("/^.+\.([^.]+)$/sU", "\\1", $this->HTTP_POST_FILES[$this->uploadFieldName]['name']); $func = function_exists(move_uploaded_file) ? move_uploaded_file : copy; return $func($this->uploadFile, $this->uploadPath . "/" . $this->destinationFileName.".".strtolower($ext)); } Которая, как я понимаю, и отвечает за копирование файлов в ту или иную папку, но вот все попытки запихнуть в нее chmod($this->uploadPath . "/" . $this->destinationFileName.".".strtolower($ext), 0666); ни к чему не приводят... В чем может быть проблема и как ее решить? |
