很简单的PHP文件上传代码
Excel数据获取演示
public function parse()
{
/**
* $_FILES数组说明
* array(n) {
* ["表单文件框名称"] => array(5) {
* ["name"] => 提交文件名称
* ["type"] => 提交文件类型 Excel为"application/vnd.ms-excel"
* ["tmp_name"] => 临时文件名称
* ["error"] => 错误(0成功1文件太大超过upload_max_filesize2文件太大超过MAX_FILE3上传不完整4没有上传文件)
* ["size"] => 文件大小(单位:KB)
* }
* }
*/
$return=array(0,'');
/**
* 判断是否提交
* is_uploaded_file(文件名称)用于确定指定的文件是否
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn