php配置文件上传文件,PHP 服务配置文件上传和文件封装

一、File Uploads

1.1、file_uploads boolean

Whether or not to allow HTTP file uploads.

See also the upload_max_filesize, upload_tmp_dir, and post_max_size directives.

是否允许HTTP文件上载。

1.2、upload_tmp_dir string

The temporary directory used for storing files when doing file upload. Must be writable by whatever user PHP is running as. If not specified PHP will use the system's default.

在进行文件上载时用于存储文件的临时目录。必须设置运行PHP服务的任何用户可以写入。如果未指定,PHP将使用系统的默认值。

1.3、upload_max_filesize integer

The maximum size of an uploaded file.

上载文件的最大大小。

1.4、max_file_uploads integer

The maximum number of files allowed to be uploaded simultaneously. Starting with PHP 5.3.4, upload fields left blank on submission do not count towards this limit.

允许同时上载的最大文件数。从php 5.3.4开始,提交时保留空白的上载字段不计入此限制。

二、Fopen wrappers 文件打开封装

2.1、allow_url_fopen boolean

This option enables the URL-aware fopen wrappers that enable accessing URL object like files. Default wrappers are provided for the access of remote files using the ftp or http protocol, some extensions like zlib may register additional wrappers.

此选项启用可访问URL对象(如文件)的支持URL的fopen包装器。默认包装器是为使用ftp或http协议访问远程文件而提供的,一些扩展名(如zlib)可能会注册其他包装器。

2.2、allow_url_include boolean

This option allows the use of URL-aware fopen wrappers with the following functions: include, include_once, require, require_once.

此选项允许使用具有以下功能的支持URL的fopen包装器:include、include_once、require、require_once。

2.3、user_agent string

Define the user agent for PHP to send.

为要发送的PHP定义user agen。

2.4、default_socket_timeout integer

Default timeout (in seconds) for socket based streams.

基于套接字的流的默认超时(秒)。

2.5、from string

The email address to be used on unauthenticated FTP connections and as the value of From header for HTTP connections, when using the ftp and http wrappers, respectively.

当分别使用ftp和http包装器时,要在未经身份验证的ftp连接上使用的电子邮件地址,以及作为http连接的from头的值。

2.6、auto_detect_line_endings boolean

When turned on, PHP will examine the data read by fgets() and file() to see if it is using Unix, MS-Dos or Macintosh line-ending conventions.

PHP将检查fgets()和file()读取的数据,以查看它是否使用了unix、ms-dos或macintosh行结束约定。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值