php.ini 核心配置选项说明php.ini核心配置选项说明

该列表只包含核心的php.ini配置选项。扩展的配置选项在各个扩展的文档页面分别被描述。有关 session 的选项可以在sessions 页面找到。

The defaults listed here are used whenphp.iniis not loaded; the values for the production and developmentphp.inimay vary.

语言和杂类配置选项
名字默认可修改范围更新日志
short_open_tag"1"PHP_INI_PERDIR 
asp_tags"0"PHP_INI_PERDIRPHP 7.0.0. 中移除。
precision"14"PHP_INI_ALL 
serialize_precision"17"PHP_INI_ALL在 PHP 5.3.5以前,默认值为 100
y2k_compliance"1"PHP_INI_ALL在 PHP 5.4.0 中移除该选项。
allow_call_time_pass_reference"1"PHP_INI_PERDIR在 PHP 5.4.0 中移除该选项。
disable_functions""仅仅为 PHP_INI_SYSTEM 
disable_classes""仅仅为php.ini 
exit_on_timeout""PHP_INI_ALL从 PHP 5.3.0 起可用。
expose_php"1"php.inionly 
hard_timeout"2"PHP_INI_SYSTEMPHP 7.1.0 起可用
zend.multibyte"0"PHP_INI_ALL从 PHP 5.4.0 起可用
zend.script_encodingNULLPHP_INI_ALL从 PHP 5.4.0 起可用
zend.detect-unicodeNULLPHP_INI_ALL从 PHP 5.4.0 起可用
zend.signal_check"0"PHP_INI_SYSTEM从 PHP 5.4.0 起可用
zend.assertions"1"PHP_INI_ALL从 PHP 7.0.0 起可用
zend.ze1_compatibility_mode"0"PHP_INI_ALL在 PHP 5.3.0 中移除该选项
detect_unicode"1"PHP_INI_ALL从 PHP 5.1.0起可用。 PHP 5.4.0 起重命名为zend.detect-unicode

这是配置指令的简短说明。

short_open_tagboolean

决定是否允许使用 PHP 代码开始标志的缩写形式(<? ?>)。如果要和 XML 结合使用 PHP,可以禁用此选项以便于嵌入使用<?xml ?>。否则还可以通过 PHP 来输出,例如:<?php echo '<?xml version="1.0"'; ?>。如果禁用了,必须使用 PHP 代码开始标志的完整形式(<?php ?>)。

本指令也会影响到缩写形式<?=,它和<? echo等价。使用此缩写需要short_open_tag的值为 On。 从 PHP 5.4.0 起,<?=总是可用的。
asp_tagsboolean
除了通常的 <?php ?> 标志之外还允许使用 ASP 风格的标志 <% %>。这也包括了输出变量值的缩写 <%= $value %>。更多信息见从 HTML 中分离一节。

Changelog forasp_tags
版本说明
7.0.0从 PHP 中移除。

precisioninteger
浮点数中显示有效数字的位数。-1means that an enhanced algorithm for rounding such numbers will be used.
serialize_precisioninteger
The number of significant digits stored while serializing floating point numbers.-1means that an enhanced algorithm for rounding such numbers will be used.
y2k_complianceboolean
强制 2000 年兼容(在不兼容的浏览器中会出问题)。
allow_call_time_pass_referenceboolean

在函数调用时参数被按照引用传递时是否发出警告。此方法已不被赞成并在 PHP/Zend 未来的版本中很可能不再支持。鼓励使用的方法是在函数定义中指定哪些参数应该用引用传递。鼓励大家尝试关闭此选项并确保脚本能够正常运行,以确保该脚本也能在未来的版本中运行(每次使用此特性都会收到一条警告)。

在函数调用时通过引用传递参数是不推荐的,因为它影响到了代码的整洁。如果函数的参数没有声明作为引用传递,函数可以通过未写入文档的方法修改其参数。要避免其副作用,最好仅在函数声明时指定那个参数需要通过引用传递。

参见引用的解释

Changelog forallow_call_time_pass_reference
版本说明
5.4.0从 PHP 中移除。
5.3.0Emits anE_DEPRECATEDlevel error.
5.0.0Deprecated, and generates anE_COMPILE_WARNINGlevel error.

expose_phpboolean

决定是否暴露 PHP 被安装在服务器上(例如在 Web 服务器的信息头中加上其签名:X-Powered-By: PHP/5.3.7)。 The PHP logo guids are also exposed, thus appending them to the URL of a PHP enabled site will display the appropriate logo(e.g., » https://www.php.net/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42). This also affects the output ofphpinfo(), as when disabled, the PHP logo and credits information will not be displayed.

Since PHP 5.5.0 these guids and thephp_logo_guid()function have been removed from PHP and the guids are replaced with data URIs instead. Thus accessing the PHP logo via appending the guid to the URL no longer works. Similarly, turningexpose_phpoff will not affect seeing the PHP logo inphpinfo().

See alsophp_logo_guid()andphpcredits().

disable_functionsstring

本指令允许你基于安全原因禁止某些函数。接受逗号分隔的函数名列表作为参数。 disable_functions 不受安全模式的影响。

Onlyinternal functionscan be disabled using this directive.User-defined functionsare unaffected.

本指令只能设置在php.ini中。例如不能将其设置在httpd.conf

disable_classesstring
本指令可以使你出于安全的理由禁用某些类。用逗号分隔类名。disable_classes 不受安全模式的影响。 本指令只能设置在php.ini中。例如不能将其设置在httpd.conf
zend.assertionsinteger
When set to1, assertion code will be generated and executed(development mode). When set to0, assertion code will be generated but it will be skipped(not executed)at runtime. When set to-1, assertion code will not be generated, making the assetions zero-cost(production mode).
If a process is started in production mode,zend.assertionscannot be changed at runtime, since the code for assertions was not generated. If a process is started in development mode,zend.assertionscannot be set to-1at runtime.
zend.ze1_compatibility_modeboolean

Enable compatibility mode with Zend Engine 1(PHP 4). It affects the cloning, casting(objects with no properties cast toFALSEor 0), andcomparing of objects. In this mode, objects are passed by value instead of reference by default.

See also the section titledMigrating from PHP 4 to PHP 5.

This feature has beenDEPRECATEDandREMOVEDas of PHP 5.3.0.
hard_timeoutinteger

zend.multibyteboolean

Enables parsing of source files in multibyte encodings. Enabling zend.multibyte is required to use character encodings like SJIS, BIG5, etc that contain special characters in multibyte string data. ISO-8859-1 compatible encodings like UTF-8, EUC, etc do not require this option.

Enabling zend.multibyte requires the mbstring extension to be available.

zend.script_encodingstring

This value will be used unless adeclare(encoding=...)directive appears at the top of the script. When ISO-8859-1 incompatible encoding is used, both zend.multibyte and zend.script_encoding must be used.

Literal strings will be transliterated from zend.script_enconding to mbstring.internal_encoding, as ifmb_convert_encoding()would have been called.

zend.detect_unicodeboolean

Check for BOM(Byte Order Mark)and see if the file contains valid multibyte characters. This detection is performed before processing of__halt_compiler(). Available only in Zend Multibyte mode.

zend.signal_checkboolean

To check for replaced signal handlers on shutdown.

exit_on_timeoutboolean

This is an Apache1 mod_php-only directive that forces an Apache child to exit if a PHP execution timeout occurred. Such a timeout causes an internal longjmp()call in Apache1 which can leave some extensions in an inconsistent state. By terminating the process any outstanding locks or memory will be cleaned up.

淘宝 adsense 商品推荐

谷歌 admob Adsense 代收Pin码 美国 香港 丰富地址代收 商务服务

价格:50元

Resource Limits
名字默认可修改范围更新日志
memory_limit"128M"PHP_INI_ALL"8M" before PHP 5.2.0, "16M" in PHP 5.2.0

这是配置指令的简短说明。

memory_limitinteger

This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to-1.

Prior to PHP 5.2.1, in order to use this directive it had to be enabled at compile time by using--enable-memory-limitin the configure line. This compile-time flag was also required to define the functionsmemory_get_usage()andmemory_get_peak_usage()prior to 5.2.1.

当使用integer时, 其值以字节来衡量。还可以使用在FAQ中描述的速记符。

See also:max_execution_time.

淘宝 云主机 商品推荐

远程电脑出租E3E5物理双路服务器租用云主机渲染模拟器虚拟机多开

价格:19元

Performance Tuning
名字默认可修改范围更新日志
realpath_cache_size"4M"PHP_INI_SYSTEMAvailable since PHP 5.1.0. Prior to PHP 7.0.16 and 7.1.2, the default was"16K"
realpath_cache_ttl"120"PHP_INI_SYSTEMAvailable since PHP 5.1.0.

这是配置指令的简短说明。

realpath_cache_sizeinteger

Determines the size of the realpath cache to be used by PHP. This value should be increased on systems where PHP opens many files, to reflect the quantity of the file operations performed.

The size represents the total number of bytes in the path strings stored, plus the size of the data associated with the cache entry. This means that in order to store longer paths in the cache, the cache size must be larger. This value does not directly control the number of distinct paths that can be cached.

The size required for the cache entry data is system dependent.

realpath_cache_ttlinteger

Duration of time(in seconds)for which to cache realpath information for a given file or directory. For systems with rarely changing files, consider increasing the value.

淘宝 SEO书 商品推荐

官方正版 SEO实战密码 60天网站流量提高20倍 第三版 百度谷歌360首页搜索引擎 优化天猫淘宝标题 关键词标题优化攻略教程书籍

价格:59元

Data Handling Configuration Options
名字默认可修改范围更新日志
arg_separator.output"&"PHP_INI_ALL 
arg_separator.input"&"PHP_INI_PERDIR 
variables_order"EGPCS"PHP_INI_PERDIRPHP_INI_ALL in PHP <= 5.0.5.
request_order""PHP_INI_PERDIRAvailable since PHP 5.3.0
auto_globals_jit"1"PHP_INI_PERDIRAvailable since PHP 5.0.0.
register_globals"0"PHP_INI_PERDIRRemoved in PHP 5.4.0.
register_argc_argv"1"PHP_INI_PERDIR 
register_long_arrays"1"PHP_INI_PERDIRDeprecated in PHP 5.3.0. Removed in PHP 5.4.0.
enable_post_data_reading"1"PHP_INI_PERDIRAvailable since PHP 5.4.0
post_max_size"8M"PHP_INI_PERDIR 
auto_prepend_fileNULLPHP_INI_PERDIR 
auto_append_fileNULLPHP_INI_PERDIR 
default_mimetype"text/html"PHP_INI_ALL 
default_charset"UTF-8"PHP_INI_ALLDefaults to "UTF-8" since PHP >= 5.6.0; empty for PHP < 5.6.0.
always_populate_raw_post_data"0"PHP_INI_PERDIRRemoved in PHP 7.0.0.

这是配置指令的简短说明。

arg_separator.outputstring

The separator used in PHP generated URLs to separate arguments.

arg_separator.inputstring

List of separator(s)used by PHP to parse input URLs into variables.

Every character in this directive is considered as separator!
variables_orderstring

Sets the order of the EGPCS(Environment,Get,Post,Cookie, andServer)variable parsing. For example, if variables_order is set to"SP"then PHP will create thesuperglobals$_SERVERand$_POST, but not create$_ENV,$_GET, and$_COOKIE. Setting to "" means nosuperglobalswill be set.

If the deprecatedregister_globalsdirective is on, then variables_order also configures the order theENV,GET,POST,COOKIEandSERVERvariables are populated in global scope. So for example if variables_order is set to"EGPCS", register_globals is enabled, and both$_GET['action']and$_POST['action']are set, then$actionwill contain the value of$_POST['action']asPcomes afterGin our example directive value.

In both the CGI and FastCGI SAPIs,$_SERVERis also populated by values from the environment;Sis always equivalent toESregardless of the placement ofEelsewhere in this directive.
The content and order of$_REQUESTis also affected by this directive.
request_orderstring

This directive describes the order in which PHP registers GET, POST and Cookie variables into the _REQUEST array. Registration is done from left to right, newer values override older values.

If this directive is not set,variables_orderis used for$_REQUESTcontents.

Note that the default distributionphp.inifiles does not contain the'C'for cookies, due to security concerns.

auto_globals_jitboolean

When enabled, the SERVER, REQUEST, and ENV variables are created when they're first used(Just In Time)instead of when the script starts. If these variables are not used within a script, having this directive on will result in a performance gain.

The PHP directivesregister_globals,register_long_arrays, andregister_argc_argvmust be disabled for this directive to have any affect. Since PHP 5.1.3 it is not necessary to haveregister_argc_argvdisabled.

Usage of SERVER, REQUEST, and ENV variables is checked during the compile time so using them through e.g.variable variableswill not cause their initialization.
register_globalsboolean

Whether or not to register the EGPCS(Environment, GET, POST, Cookie, Server)variables as global variables.

As of » PHP 4.2.0, this directive defaults tooff.

Please read the security chapter onUsing register_globalsfor related information.

Please note thatregister_globalscannot be set at runtime(ini_set()). Although, you can use.htaccessif your host allows it as described above. An example.htaccessentry:php_flag register_globals off.

register_globalsis affected by thevariables_orderdirective.
本特性已自 PHP 5.3.0 起废弃并将自 PHP 5.4.0 起移除
register_argc_argvboolean
Tells PHP whether to declare the argv & argc variables(that would contain the GET information). See alsocommand line.
register_long_arraysboolean
Tells PHP whether or not to register the deprecated long$HTTP_*_VARStypepredefined variables. When On(default), long predefined PHP variables like$HTTP_GET_VARSwill be defined. If you're not using them, it's recommended to turn them off, for performance reasons. Instead, use the superglobal arrays, like$_GET. This directive became available in PHP 5.0.0.
本特性已自 PHP 5.3.0 起废弃并将自 PHP 5.4.0 起移除
enable_post_data_readingboolean
Disabling this option causes$_POSTand$_FILESnotto be populated. The only way to read postdata will then be through thephp://inputstream wrapper. This can be useful to proxy requests or to process the POST data in a memory efficient fashion.
post_max_sizeinteger
Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger thanupload_max_filesize. Generally speaking,memory_limitshould be larger thanpost_max_size. 当使用integer时, 其值以字节来衡量。还可以使用在FAQ中描述的速记符。If the size of post data is greater than post_max_size, the$_POSTand$_FILESsuperglobalsare empty. This can be tracked in various ways, e.g. by passing the$_GETvariable to the script processing the data, i.e.<form action="edit.php?processed=1">, and then checking if$_GET['processed']is set.

PHP allows shortcuts for byte values, including K(kilo), M(mega)and G(giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit(if you're using 32bit versions)as it will cause your script to fail.

Changelog forpost_max_size
版本说明
5.3.4post_max_size= 0 will not disable the limit when the content type is application/x-www-form-urlencoded or is not registered with PHP.
5.3.2 , 5.2.12Allow unlimited post size by settingpost_max_sizeto 0.

auto_prepend_filestring

Specifies the name of a file that is automatically parsed before the main file. The file is included as if it was called with therequirefunction, soinclude_pathis used.

The special valuenonedisables auto-prepending.

auto_append_filestring

Specifies the name of a file that is automatically parsed after the main file. The file is included as if it was called with therequirefunction, soinclude_pathis used.

The special valuenonedisables auto-appending.

If the script is terminated withexit(), auto-append willnotoccur.

default_mimetypestring

By default, PHP will output a media type using the Content-Type header. To disable this, simply set it to be empty.

PHP's built-in default media type is set to text/html.

default_charsetstring

In PHP 5.6 onwards, "UTF-8" is the default value and its value is used as the default character encoding forhtmlentities(),html_entity_decode()andhtmlspecialchars()if theencodingparameter is omitted. The value ofdefault_charsetwill also be used to set the default character set foriconvfunctions if theiconv.input_encoding,iconv.output_encodingandiconv.internal_encodingconfiguration options are unset, and formbstringfunctions if thembstring.http_inputmbstring.http_outputmbstring.internal_encodingconfiguration option is unset.

All versions of PHP will use this value as the charset within the default Content-Type header sent by PHP if the header isn't overridden by a call toheader().

Settingdefault_charsetto an empty value is not recommended.

input_encodingstring

Available from PHP 5.6.0. This setting is used for multibyte modules such as mbstring and iconv. Default is empty.

output_encodingstring

Available from PHP 5.6.0. This setting is used for multibyte modules such as mbstring and iconv. Default is empty.

internal_encodingstring

Available from PHP 5.6.0. This setting is used for multibyte modules such as mbstring and iconv. Default is empty. If empty,default_charsetis used.

always_populate_raw_post_datamixed
This feature wasDEPRECATEDin PHP 5.6.0, andREMOVEDas of PHP 7.0.0.

If set toTRUE, PHP will always populate the$HTTP_RAW_POST_DATAcontaining the raw POST data. Otherwise, the variable is populated only when the MIME type of the data is unrecognised.

The preferred method for accessing raw POST data isphp://input, and$HTTP_RAW_POST_DATAis deprecated in PHP 5.6.0 onwards. Settingalways_populate_raw_post_datato-1will opt into the new behaviour that will be implemented in a future version of PHP, in which$HTTP_RAW_POST_DATAis never defined.

Regardless of the setting,$HTTP_RAW_POST_DATAis not available withenctype="multipart/form-data".

See also:magic_quotes_gpc,magic_quotes_runtime, andmagic_quotes_sybase.

淘宝 建站 书 商品推荐

正版 从0到1 HTML+CSS+JavaScript快速上手 网页制作与设计教程 web html5 dw开发建站网站建设 web前端开发书籍 前端静态页面制作

价格:46.8元

Paths and Directories Configuration Options
名字默认可修改范围更新日志
include_path".;/path/to/php/pear"PHP_INI_ALL 
open_basedirNULLPHP_INI_ALLPHP_INI_SYSTEM in PHP < 5.3.0
doc_rootNULLPHP_INI_SYSTEM 
user_dirNULLPHP_INI_SYSTEM 
user_ini.cache_ttl"300"PHP_INI_SYSTEMAvailable since PHP 5.3.0.
user_ini.filename".user.ini"PHP_INI_SYSTEMAvailable since PHP 5.3.0.
extension_dir"/path/to/php"PHP_INI_SYSTEM 
extensionNULLphp.inionly 
zend_extensionNULLphp.inionly 
zend_extension_debugNULLphp.inionlyAvailable before PHP 5.3.0.
zend_extension_debug_tsNULLphp.inionlyAvailable before PHP 5.3.0.
zend_extension_tsNULLphp.inionlyAvailable before PHP 5.3.0.
cgi.check_shebang_line"1"PHP_INI_SYSTEMAvailable since PHP 5.2.0.
cgi.discard_path"0"PHP_INI_SYSTEMAvailable since PHP 5.3.0.
cgi.fix_pathinfo"1"PHP_INI_SYSTEMPHP_INI_ALL prior to PHP 5.2.1.
cgi.force_redirect"1"PHP_INI_SYSTEMPHP_INI_ALL prior to PHP 5.2.1.
cgi.nph"0"PHP_INI_SYSTEMAvailable since PHP 5.3.0.
cgi.redirect_status_envNULLPHP_INI_SYSTEMPHP_INI_ALL prior to PHP 5.2.1.
cgi.rfc2616_headers"0"PHP_INI_ALL 
fastcgi.impersonate"0"PHP_INI_SYSTEMPHP_INI_ALL prior to PHP 5.2.1.
fastcgi.logging"1"PHP_INI_SYSTEMPHP_INI_ALL prior to PHP 5.2.1.

这是配置指令的简短说明。

include_pathstring

Specifies a list of directories where therequire,include,fopen(),file(),readfile()andfile_get_contents()functions look for files. The format is like the system'sPATHenvironment variable: a list of directories separated with a colon in Unix or semicolon in Windows.

PHP considers each entry in the include path separately when looking for files to include. It will check the first path, and if it doesn't find it, check the next path, until it either locates the included file or returns with awarningor anerror. You may modify or set your include path at runtime usingset_include_path().

Example #1 Unix include_path

include_path=".:/php/includes"

Example #2 Windows include_path

include_path=".;c:\php\includes"

Using a.in the include path allows for relative includes as it means the current directory. However, it is more efficient to explicitly useinclude './file'than having PHP always check the current directory for every include.

ENVvariables are also accessible in .ini files. As such it is possible to reference the home directory using${LOGIN}and${USER}. Environment variables may vary between Server APIs as those environments may be different.

Example #3 Unix include_path using ${USER}env variable

include_path = ".:${USER}/pear/php"

open_basedirstring

Limit the files that can be accessed by PHP to the specified directory-tree, including the file itself. This directive isNOTaffected by whether Safe Mode is turned On or Off.

When a script tries to access the filesystem, for example usinginclude, orfopen(), the location of the file is checked. When the file is outside the specified directory-tree, PHP will refuse to access it. All symbolic links are resolved, so it's not possible to avoid this restriction with a symlink. If the file doesn't exist then the symlink couldn't be resolved and the filename is compared to(a resolved)open_basedir.

open_basedircan affect more than just filesystem functions; for example ifMySQLis configured to usemysqlnddrivers,LOAD DATA INFILEwill be affected byopen_basedir. Much of the extended functionality of PHP usesopen_basedirin this way.

The special value.indicates that the working directory of the script will be used as the base-directory. This is, however, a little dangerous as the working directory of the script can easily be changed withchdir().

Inhttpd.conf,open_basedircan be turned off(e.g. for some virtual hosts)the same wayas any other configuration directive with "php_admin_value open_basedir none".

Under Windows, separate the directories with a semicolon. On all other systems, separate the directories with a colon. As an Apache module,open_basedirpaths from parent directories are now automatically inherited.

The restriction specified withopen_basediris a directory name since PHP 5.2.16 and 5.3.4. Previous versions used it as a prefix. This means that "open_basedir = /dir/incl" also allowed access to "/dir/include" and "/dir/incls" if they exist. When you want to restrict access to only the specified directory, end with a slash. For example:open_basedir = /dir/incl/

The default is to allow all files to be opened.

As of PHP 5.3.0 open_basedir can be tightened at run-time. This means that if open_basedir is set to/www/inphp.inia script can tighten the configuration to/www/tmp/at run-time withini_set(). When listing several directories, you can use thePATH_SEPARATORconstant as a separator regardless of the operating system.
doc_rootstring

PHP's "root directory" on the server. Only used if non-empty. If PHP is configured with安全模式, no files outside this directory are served. If PHP was not compiled with FORCE_REDIRECT, youshouldset doc_root if you are running PHP as a CGI under any web server(other than IIS). The alternative is to use thecgi.force_redirectconfiguration below.

user_ini.cache_ttlinteger

user_ini.filenamestring

user_dirstring

The base name of the directory used on a user's home directory for PHP files, for examplepublic_html.

extension_dirstring

In what directory PHP should look for dynamically loadable extensions. See also:enable_dl, anddl().

extensionstring

Which dynamically loadable extensions to load when PHP starts up.

zend_extensionstring

Name of dynamically loadable Zend extension(for exampleAPD)to load when PHP starts up.

zend_extension_debugstring

Variant ofzend_extensionfor extensions compiled with debug info prior to PHP 5.3.0.

zend_extension_debug_tsstring

Variant ofzend_extensionfor extensions compiled with debug info and thread safety prior to PHP 5.3.0.

zend_extension_tsstring

Variant ofzend_extensionfor extensions compiled with thread safety prior to PHP 5.3.0.

cgi.check_shebang_lineboolean

Controls whetherCGIPHP checks for line starting with#!(shebang)at the top of the running script. This line might be needed if the script support running both as stand-alone script and via PHPCGI. PHP inCGImode skips this line and ignores its content if this directive is turned on.

cgi.discard_pathboolean

If this is enabled, the PHP CGI binary can safely be placed outside of the web tree and people will not be able to circumvent .htaccess security.

cgi.fix_pathinfoboolean

ProvidesrealPATH_INFO/PATH_TRANSLATEDsupport forCGI. PHP's previous behaviour was to setPATH_TRANSLATEDtoSCRIPT_FILENAME, and to not grok whatPATH_INFOis. For more information onPATH_INFO, see theCGIspecs. Setting this to1will cause PHPCGIto fix its paths to conform to the spec. A setting of zero causes PHP to behave as before. It is turned on by default. You should fix your scripts to useSCRIPT_FILENAMErather thanPATH_TRANSLATED.

cgi.force_redirectboolean

cgi.force_redirect is necessary to provide security running PHP as aCGIunder most web servers. Left undefined, PHP turns this on by default. You can turn it offat your own risk.

Windows Users: When using IIS this optionmustbe turned off. For OmniHTTPD or Xitami the same applies.
cgi.nphboolean

If cgi.nph is enabled it will force cgi to always sent Status: 200 with every request.

cgi.redirect_status_envstring

If cgi.force_redirect is turned on, and you are not running under Apache or Netscape(iPlanet)web servers, youmayneed to set an environment variable name that PHP will look for to know it is OK to continue execution.

Setting this variablemaycause security issues,know what you are doing first.
cgi.rfc2616_headersint

Tells PHP what type of headers to use when sending HTTP response code. If it's set to 0, PHP sends a » RFC 3875 "Status:" header that is supported by Apache and other web servers. When this option is set to 1, PHP will send » RFC 2616 compliant headers.

If this option is enabled, and you are running PHP in a CGI environment(e.g. PHP-FPM)you should not use standard RFC 2616 style HTTP status response headers, you should instead use their RFC 3875 equivalent e.g. instead of header("HTTP/1.0 404 Not found"); you should use header("Status: 404 Not Found");

Leave it set to 0 unless you know what you're doing.

fastcgi.impersonatestring

FastCGI under IIS(on WINNT based OS)supports the ability to impersonate security tokens of the calling client. This allows IIS to define the security context that the request runs under. mod_fastcgi under Apache does not currently support this feature(03/17/2002)Set to 1 if running under IIS. Default is zero.

fastcgi.loggingboolean

Turns on SAPI logging when using FastCGI. Default is to enable logging.

淘宝 网站联盟 商品推荐

淘宝联盟淘礼金权限申请创建网站推广位API权限玩法钱包权限开通

价格:10元

File Uploads Configuration Options
名字默认可修改范围更新日志
file_uploads"1"PHP_INI_SYSTEM 
upload_tmp_dirNULLPHP_INI_SYSTEM 
max_input_nesting_level64PHP_INI_PERDIRAvailable since PHP 5.3.9.
max_input_vars1000PHP_INI_PERDIRAvailable since PHP 5.3.9.
upload_max_filesize"2M"PHP_INI_PERDIR 
max_file_uploads20PHP_INI_SYSTEMAvailable since PHP 5.2.12.

这是配置指令的简短说明。

file_uploadsboolean

Whether or not to allow HTTPfile uploads. See also theupload_max_filesize,upload_tmp_dir, andpost_max_sizedirectives.

upload_tmp_dirstring

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.

If the directory specified here is not writable, PHP falls back to the system default temporary directory. Ifopen_basediris on, then the system default directory must be allowed for an upload to succeed.

upload_max_filesizeinteger

The maximum size of an uploaded file.

当使用integer时, 其值以字节来衡量。还可以使用在FAQ中描述的速记符。
max_file_uploadsinteger

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.

淘宝 流量变现 商品推荐

私域流量 从0到1搭建私域流量池的方法论 祝福 搭建私域流量池 用户精细化运营 IP打造教程 流量变现 内容营销 私域流量运营书籍

价格:35.4元

General SQL Configuration Options
名字默认可修改范围更新日志
sql.safe_mode"0"PHP_INI_SYSTEMRemoved in PHP 7.2.0

这是配置指令的简短说明。

sql.safe_modeboolean

If turned on, database connection functions that specify default values will use those values in place of any user-supplied arguments. For details on the default values, see the documentation for the relevant connection functions.

This feature has beenREMOVEDas of PHP 7.2.0.

Windows Specific Configuration Options
名字默认可修改范围更新日志
windows.show_crt_warning"0"PHP_INI_ALLAvailable since PHP 5.4.0.

这是配置指令的简短说明。

windows.show_crt_warningboolean

This directive shows the Windows CRT warnings when enabled. These warnings were displayed by default until PHP 5.4.0.