Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.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
Input 从ExpressionEngine输入文件?_Input_Expressionengine - Fatal编程技术网

Input 从ExpressionEngine输入文件?

Input 从ExpressionEngine输入文件?,input,expressionengine,Input,Expressionengine,有没有办法使用EE的输入类引用上传的文件?我知道它有一个“post”方法来获取post变量,但是关于文件呢?不在输入类中,您可以只使用$\u文件 不过,您可能想看看Upload类。为了更好地了解它的工作原理,您可以在EE目录下的Filemanager库文件中查看函数_upload_file()。底漆: $this->EE->load->library('upload'); $this->EE->upload->initialize($confi

有没有办法使用EE的输入类引用上传的文件?我知道它有一个“post”方法来获取post变量,但是关于文件呢?

不在输入类中,您可以只使用$\u文件

不过,您可能想看看Upload类。为了更好地了解它的工作原理,您可以在EE目录下的Filemanager库文件中查看函数_upload_file()。底漆:

    $this->EE->load->library('upload');
    $this->EE->upload->initialize($config);

    if ( ! $this->EE->upload->do_upload($field_name))
    {
        return $this->_upload_error(
            $this->EE->upload->display_errors()
        );
    }

    $file = $this->EE->upload->data();

$config
数组包含上载选项,您可以在中查看。

不在输入类中,您可以只使用$\u文件

不过,您可能想看看Upload类。为了更好地了解它的工作原理,您可以在EE目录下的Filemanager库文件中查看函数_upload_file()。底漆:

    $this->EE->load->library('upload');
    $this->EE->upload->initialize($config);

    if ( ! $this->EE->upload->do_upload($field_name))
    {
        return $this->_upload_error(
            $this->EE->upload->display_errors()
        );
    }

    $file = $this->EE->upload->data();
$config
数组包含上载选项,您可以在中查看这些选项