Вход
Главное меню

Subject:*
Name/Email:*
Message Icon:*
       
Select*
Message:*


    


Click the Preview to see the content in action.
Options:*
 
 
 
 
Attach file*
   

Maximum file size: 100Kb;  Allowed extensions: zip jpg gif png  
Images at the max. Size 640 X 800 pixels. 
Confirmation Code*
3 - 2 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
   
*
* = Required

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); ни к чему не приводят...
В чем может быть проблема и как ее решить?
Powered by XOOPS © 2001-2023 The XOOPS Project