Java小强个人技术博客站点    手机版
当前位置: 首页 >> PHP >> Apache PHP 配置文件上传

Apache PHP 配置文件上传

96180 PHP | 2014-12-20

在PHP配置文件中配置属性:

 

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir =E:/usr/temp/
; Maximum allowed size for uploaded files.
upload_max_filesize = 20M
max_file_uploads = 20
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = Off
; Define the anonymous ftp password (your email address)
;from="john@doe.com"
; Define the User-Agent string
; user_agent="PHP"
; Default timeout for socket based streams (seconds)
default_socket_timeout = 300

 

如果前面有分号,则是注销,你可以用编辑工具打开来看。

开启上传、限制大小、限制个数、最后是超时时间。

 

Apache中则配置LimitRequestBody属性。

如:

LimitRequestBody 10485760

 LimitRequestBody: Apache Limiting User Upload File Size 。

推荐您阅读更多有关于“ apache php 上传 个数 大小 ”的文章

上一篇:本周笑话集锦 又是一年春来到 下一篇:apache访问提示You don't have permission

猜你喜欢

发表评论: