Home > Backend Development > PHP Tutorial > php上传大文件配置

php上传大文件配置

WBOY
Release: 2016-06-20 12:43:50
Original
941 people have browsed it

PHP上传大文件解决办法

在php.ini配置文件中配置如下



php_value session.gc_maxlifetime 10800
php_value max_input_time         10800
php_value max_execution_time     10800
php_value upload_max_filesize    110M
php_value post_max_size          120M



再上传就OK了


name="upvideo">

上传文件:


 

 




 


if ($_FILES["video"]["error"] > 0)

  {

  echo "Error: " . $_FILES["video"]["error"] . "
";

  } else {

  print_r($_FILES["video"]); 

if(is_uploaded_file($_FILES['video']['tmp_name'])){ 

$upfile=$_FILES["video"]; 

//获取数组里面的值 

$name=$upfile["name"];//上传文件的文件名 

$type=$upfile["type"];//上传文件的类型 

$size=$upfile["size"];//上传文件的大小 

$tmp_name=$upfile["tmp_name"];//上传文件的临时存放路径 

move_uploaded_file($tmp_name, 'video/a.qsv');

}

  }

?>



Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template