Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用codeigniter生成的缩略图_Php_Codeigniter_Thumbnails - Fatal编程技术网

Php 使用codeigniter生成的缩略图

Php 使用codeigniter生成的缩略图,php,codeigniter,thumbnails,Php,Codeigniter,Thumbnails,CI生成的缩略图是对我还是对每个人都有777权限? 我如何设置它在默认情况下只有644 谢谢在您的应用程序/configs/constants.php文件中,您有4个常量: define('FILE_READ_MODE', 0644); define('FILE_WRITE_MODE', 0666); define('DIR_READ_MODE', 0755); define('DIR_WRITE_MODE', 0777); 对于图像库,由于未知原因,codeigniter使用DIR\u WR

CI生成的缩略图是对我还是对每个人都有777权限? 我如何设置它在默认情况下只有644


谢谢

在您的应用程序/configs/constants.php文件中,您有4个常量:

define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);
对于图像库,由于未知原因,codeigniter使用
DIR\u WRITE\u模式
存储图像文件

您应该与CI人员仔细检查这一点,因为我认为他们应该使用
FILE\u WRITE\u模式

您可以打开库文件并手动修改部分,如

if ($this->dynamic_output === FALSE)
    {
    if ($this->orig_width == $this->width AND $this->orig_height == $this->height)
    {
        if ($this->source_image != $this->new_image)
        {
            if (@copy($this->full_src_path, $this->full_dst_path))
            {
                @chmod($this->full_dst_path, DIR_WRITE_MODE);
            }
        }
        return TRUE;
    }
}
并更改行
@chmod($this->full_dst_path,DIR_WRITE_MODE)
文件\写入\模式
,以便正确写入


文件中有几个类似的部分,因此您可能需要在应用程序/configs/constants.php文件中搜索其他部分。您有4个常量:

define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);
对于图像库,由于未知原因,codeigniter使用
DIR\u WRITE\u模式
存储图像文件

您应该与CI人员仔细检查这一点,因为我认为他们应该使用
FILE\u WRITE\u模式

您可以打开库文件并手动修改部分,如

if ($this->dynamic_output === FALSE)
    {
    if ($this->orig_width == $this->width AND $this->orig_height == $this->height)
    {
        if ($this->source_image != $this->new_image)
        {
            if (@copy($this->full_src_path, $this->full_dst_path))
            {
                @chmod($this->full_dst_path, DIR_WRITE_MODE);
            }
        }
        return TRUE;
    }
}
并更改行
@chmod($this->full_dst_path,DIR_WRITE_MODE)
文件\写入\模式
,以便正确写入


文件中有几个类似的部分,因此您可能需要搜索其他部分

谢谢您的详细解释。谢谢您的详细解释。