与文件上传有关的php配置参数总结

来源:互联网 发布:手机如何发淘宝网址 编辑:程序博客网 时间:2024/06/05 14:17
=====有关的php配置参数总结============================
1.file_uploads 
设为On,允许通过HTTP上传文件 

2.upload_tmp_dir 
文件上传至服务器时用于临时存储的目录,如果没指定,系统会使用默认的临时文件夹(我的机器是/tmp)。 

3.upload_max_filesize 
允许上传文件大小的最大值,默认为2M。 

4.post_max_size 
Php可接收的post数据的最大值(包括表单里的所有值的总合),默认为8M。 

5.memory_limit 
每个php所最占的最大内存数,这个值要大于允许上传的文件大小。 

6.max_execution_time 
每个php运行的最长时间(秒),默认30秒。 

7.max_input_time 
Php解析POST/GET数据的最长时间(秒),默认60秒。This sets the maximum time in secondsa scripts is allowed to parse input data, like POST and GET.It ismeasured from the mement of receiving all data on the server to thestart of script execution. 

==========================================================
1

安全模式下不能使用ini_set的指令:max_input_time、post_max_size、upload_max_filesize

此时的做法通.htaccess进行配置,但前提要求设置是 AllowOverride All

  1. php_value upload_max_filesize 8M   
  2. php_value post_max_size 10M   


0 0
原创粉丝点击