Input 从ExpressionEngine输入文件?
有没有办法使用EE的输入类引用上传的文件?我知道它有一个“post”方法来获取post变量,但是关于文件呢?不在输入类中,您可以只使用$\u文件 不过,您可能想看看Upload类。为了更好地了解它的工作原理,您可以在EE目录下的Filemanager库文件中查看函数_upload_file()。底漆: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
$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
数组包含上载选项,您可以在中查看这些选项