0

这是我的错误的打印屏幕,请点击..

我在这里使用codeigniter,这是我的控制器......

class Copy extends CI_Controller {

public function index()
{
    redirect('home');
    ini_set("memory_limit", "4096M");
}

public function getFile($file = '')
{
    $this->load->model('home_model');
    $files = $this->home_model->getFile($file);
    $this->load->library('zip');
    $this->load->helper('download');

    if($files !== FALSE)
    {
        foreach ($files->result() as $row)
        {

            $data = file_get_contents(base_url().$row->File_Path); // Read the file's contents

            $name = substr($row->File_Path, 26);
            $name2 = str_replace("_", " ", $name);

            force_download($name2, $data);
        }
    }

}

}

我正在使用 codeigniter helper DOWNLOAD来下载服务器中的文件...

我已经将 php.ini 2048M中的memory_limit更新为4096M,似乎什么也没发生,我尝试将ini_set('memory_limit','4096M'); 在我的代码中,它也不起作用......

有人可以告诉我如何解决这个问题...谢谢

4

0 回答 0