PHP 手冊
上一頁 | 附錄 H.List of core `php.ini` directives | 下一頁

# Language Options

表格 H-2.Language and Misc Configuration Options

Name | Default | Changeable
--- | --- | ---
short_open_tag | On | PHP_INI_SYSTEM|PHP_INI_PERDIR
asp_tags | Off | PHP_INI_SYSTEM|PHP_INI_PERDIR
precision | "14" | PHP_INI_ALL
y2k_compliance | Off | PHP_INI_ALL
allow_call_time_pass_reference | On | PHP_INI_SYSTEM|PHP_INI_PERDIR
expose_php | On | PHP_INI_SYSTEM
zend.ze1_compatibility_mode | Off | PHP_INI_ALL

這裡為簡短的結構指令說明。

short_open_tag boolean

  Tells whether the short form (`<? ?>`) of PHP's open tag should be allowed. If you want to use PHP in combination with XML, you can disable this option in order to use `<?xml ?>` inline. Otherwise, you can print it with PHP, for example: `<?php echo '<?xml version="1.0"'; ?>`. Also if disabled, you must use the long form of the PHP open tag (`<?php ?>`).

  > 備注: This directive also affects the shorthand `<?=`, which is identical to `<? echo`. Use of this shortcut requires short_open_tag to be on.

asp_tags boolean

  Enables the use of ASP-like <% %> tags in addition to the usual <?php ?> tags. This includes the variable-value printing shorthand of <%= $value %>. For more information, see Escaping from HTML.

  > 備注: Support for ASP-style tags was added in 3.0.4.

precision integer

  The number of significant digits displayed in floating point numbers.

y2k_compliance boolean

  Enforce year 2000 compliance (will cause problems with non-compliant browsers)

allow_call_time_pass_reference boolean

  Whether to enable the ability to force arguments to be passed by reference at function call time. This method is deprecated and is likely to be unsupported in future versions of PHP/Zend. The encouraged method of specifying which arguments should be passed by reference is in the function declaration. You're encouraged to try and turn this option Off and make sure your scripts work properly with it in order to ensure they will work with future versions of the language (you will receive a warning each time you use this feature, and the argument will be passed by value instead of by reference).

  See also References Explained.

expose_php boolean

  Decides whether PHP may expose the fact that it is installed on the server (e.g. by adding its signature to the Web server header). It is no security threat in any way, but it makes it possible to determine whether you use PHP on your server or not.

zend.ze1_compatibility_mode boolean

  Enable compatibility mode with Zend Engine 1 (PHP 4). It affects the cloning, casting, and comparing of objects.

上一頁 | 最開頭 | 下一頁
List of core `php.ini` directives | 上一層 | Resource Limits