名称 | 默认值 | 可修改范围 | 更新记录 |
---|---|---|---|
short_open_tag | "1" | PHP_INI_PERDIR | 在 PHP <= 4.0.0 时是 PHP_INI_ALL。 |
asp_tags | "0" | PHP_INI_PERDIR | 在 PHP <= 4.0.0 时是 PHP_INI_ALL。 |
precision | "14" | PHP_INI_ALL | |
y2k_compliance | "1" | PHP_INI_ALL | |
allow_call_time_pass_reference | "1" | PHP_INI_PERDIR | 在 PHP <= 4.0.0 时是 PHP_INI_ALL。 |
expose_php | "1" | 仅可在 php.ini 中配置。 | |
zend.ze1_compatibility_mode | "0" | PHP_INI_ALL | 从 PHP 5.0.0 起可用。 |
short_open_tag
boolean
注意: 本指令也会影响到缩写形式 <?=,它和 <? echo 等价。使用此缩写须要 short_open_tag 的值为 On。
asp_tags
boolean
注意: ASP 风格标志的支持是 3.0.4 版新加的。
precision
integer
y2k_compliance
boolean
allow_call_time_pass_reference
boolean
expose_php
boolean
zend.ze1_compatibility_mode
boolean
memory_limit
integer
名称 | 默认值 | 可修改范围 | 更新记录 |
---|---|---|---|
realpath_cache_size | "16K" | PHP_INI_SYSTEM | 自 PHP 5.1.0 起可用。 |
realpath_cache_ttl | "120" | PHP_INI_SYSTEM | 自 PHP 5.1.0 起可用。 |
名称 | 默认值 | 可修改范围 | 更新记录 |
---|---|---|---|
track_vars | "On" | PHP_INI_?? | |
arg_separator.output | "&" | PHP_INI_ALL | 从 PHP 4.0.5 起可用。 |
arg_separator.input | "&" | PHP_INI_PERDIR | 从 PHP 4.0.5 起可用。 |
variables_order | "EGPCS" | PHP_INI_PERDIR | 在 PHP <= 5.0.5 时是 PHP_INI_ALL。 |
auto_globals_jit | "1" | PHP_INI_PERDIR | 从 PHP 5.0.0 起可用。 |
register_globals | "0" | PHP_INI_PERDIR | 在 PHP <= 4.2.3 时是 PHP_INI_ALL。 |
register_argc_argv | "1" | PHP_INI_PERDIR | 在 PHP <= 4.2.3 时是 PHP_INI_ALL。 |
register_long_arrays | "1" | PHP_INI_PERDIR | 从 PHP 5.0.0 起可用。 |
post_max_size | "8M" | PHP_INI_PERDIR | 在 PHP <= 4.2.3 时是 PHP_INI_ALL。从 PHP 4.0.3 起可用。 |
gpc_order | "GPC" | PHP_INI_ALL | |
auto_prepend_file | NULL | PHP_INI_PERDIR | 在 PHP <= 4.2.3 时是 PHP_INI_ALL。 |
auto_append_file | NULL | PHP_INI_PERDIR | 在 PHP <= 4.2.3 时是 PHP_INI_ALL。 |
default_mimetype | "text/html" | PHP_INI_ALL | |
default_charset | "" | PHP_INI_ALL | |
always_populate_raw_post_data | "0" | PHP_INI_PERDIR | 在 PHP <= 4.2.3 时是 PHP_INI_ALL。从 PHP 4.1.0 起可用。 |
allow_webdav_methods | "0" | PHP_INI_PERDIR |
track_vars
boolean
$_ENV
,
$_GET
,
$_POST
,
$_COOKIE
和
$_SERVER
。
arg_separator.output
string
arg_separator.input
string
注意: 本指令中的每一个字符都会被当成分隔符!
variables_order
string
auto_globals_jit
boolean
register_globals
boolean
注意: register_globals 受 variables_order 选项的影响。
register_argc_argv
boolean
register_long_arrays
boolean
$HTTP_*_VARS
之类的
预约义变量。若是为 On(默认值),则相似
$HTTP_GET_VARS
的 PHP 变量会被注册。若是不使用,为性能考虑建议关闭此选项,而使用超全局数组例如
$_GET
替代之。
post_max_size
integer
$_POST
和
$_FILES
superglobals 便会为空。这能够以多种方式证实,例如,传递
$_GET
变量到脚本以处理数据, 也就是
<form action="edit.php?processed=1">, 而后查看
$_GET['processed']
是否被设置。
gpc_order
string
注意: 本选项不能用于 PHP 4。用 variables_order 替代之。
auto_prepend_file
string
auto_append_file
string
注意: 若是脚本经过 exit() 终止,则自动后缀 不会发生。
default_mimetype
string
default_charset
string
always_populate_raw_post_data
boolean
$HTTP_RAW_POST_DATA
变量包含有原始的 POST 数据。不然,此变量仅在碰到未识别 MIME 类型的数据时产生。不过,访问原始 POST 数据的更好方法是
php://input。
$HTTP_RAW_POST_DATA
对于
enctype="multipart/form-data" 表单数据不可用。
allow_webdav_methods
boolean
名称 | 默认值 | 可修改范围 | 更新记录 |
---|---|---|---|
include_path | ".;/path/to/php/pear" | PHP_INI_ALL | |
doc_root | NULL | PHP_INI_SYSTEM | |
user_dir | NULL | PHP_INI_SYSTEM | |
extension_dir | "/path/to/php" | PHP_INI_SYSTEM | |
extension | NULL | 仅限于 php.ini | |
cgi.fix_pathinfo | "1" | PHP_INI_ALL | 从 PHP 4.3.0 起可用 |
cgi.force_redirect | "1" | PHP_INI_ALL | 从 PHP 4.2.0 起可用 |
cgi.redirect_status_env | NULL | PHP_INI_ALL | 从 PHP 4.2.0 起可用 |
fastcgi.impersonate | "0" | PHP_INI_ALL | 从 PHP 4.3.0 起可用 |
cgi.rfc2616_headers | "0" | PHP_INI_ALL | 从 PHP 4.3.0 起可用 |
include_path
string
PATH
环境变量相似:一组目录的列表,在 UNIX 下用冒号分隔,在 Windows 下用分号分隔。
doc_root
string
user_dir
string
extension_dir
string
extension
string
cgi.fix_pathinfo
boolean
cgi.force_redirect
boolean
注意: Windows 用户:能够安全地在 IIS 之下将其关闭,事实上必须这么作。要在 OmniHTTPD 或 Xitami 之下使用也必须将其关闭。
cgi.redirect_status_env
string
注意: 设定此变量可能会致使安全问题,首先要知道本身在作什么。
fastcgi.impersonate
string
cgi.rfc2616_headers
int
名称 | 默认值 | 可修改范围 | 更新记录 |
---|---|---|---|
file_uploads | "1" | PHP_INI_SYSTEM | 在 PHP <= 4.2.3 时是 PHP_INI_ALL。从 PHP 4.0.3 起可用。 |
upload_tmp_dir | NULL | PHP_INI_SYSTEM | |
upload_max_filesize | "2M" | PHP_INI_PERDIR | 在 PHP <= 4.2.3 时是 PHP_INI_ALL。 |
sql.safe_mode
boolean
当心 |
仅 PHP 3 实现了一个默认的调试器。更多信息请参考
附录 G。
|
常量 | 值 | 含义 |
---|---|---|
PHP_INI_USER | 1 | 配置选项可在用户的 PHP 脚本或 Windows 注册表中设置 |
PHP_INI_PERDIR | 2 | 配置选项可在 php.ini, .htaccess 或 httpd.conf 中设置 |
PHP_INI_SYSTEM | 4 | 配置选项可在 php.ini or httpd.conf 中设置 |
PHP_INI_ALL | 7 | 配置选项可在各处设置 |