小弟我的这个文件上传类中的input里面的name为什么不能等于数组
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了小弟我的这个文件上传类中的input里面的name为什么不能等于数组,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1277字,纯文字阅读大概需要2分钟。
内容图文
![小弟我的这个文件上传类中的input里面的name为什么不能等于数组](/upload/InfoBanner/zyjiaocheng/222/a167e97e7eba43028f9075d295f46c26.jpg)
class SyFile {
private $_upl_dir;
private $_refu_type;
private $_acce_type;
private $_errno = 0;
private $_ext;
public function __construct( $_upl_dir = '../upload', $size = 8388608 ) {
$this->_upl_dir = $_upl_dir;
if ( is_numeric( $_size ) ) @ini_set('upload_max_filesize',intval($_size));
$this->check_upload_dir();
}
/**
* set the accept file extension
* @param $acce_type;
*/
public function set_accept_type( $acce_type ) {
$this->_acce_type = $acce_type;
}
/**
* set the refuse file extension
* @param $refuse_type;
*/
public function set_refuse_type( $refuse_type ) {
$this->_refu_type = $refuse_type;
}
/**
* handing the files from the speicified file input .
* @param $name (the file input name )
* @param $over (if isn't overwrite the file)
*/
public function upload( $name,$_prefix = '', $over = true) {
$_error = $_FILES[''.$name.'']['error'];
$_local = $_FILES[''.$name.'']['name'];
$_temp = $_FILES[''.$name.'']['tmp_name'];
$_files = NULL;
$_size = count($_local);
if ( $_error != 0 ) return $_files;
$this->isLegal($_local);
if ( $this->_errno != 0 ) return $_files;
if ( $over && is_uploaded_file( $_temp ) ) {
$file = $this->generate( $_prefix );
if ( move_uploaded_file( $_temp, $this->_upl_dir.'/'.$file ) )
$_files = $file;
}
return $_files;
}
内容总结
以上是互联网集市为您收集整理的小弟我的这个文件上传类中的input里面的name为什么不能等于数组全部内容,希望文章能够帮你解决小弟我的这个文件上传类中的input里面的name为什么不能等于数组所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。