Home >Backend Development >PHP Tutorial >php.ini Chinese version instructions_PHP tutorial
[PHP]
; PHP is still an evolving tool and its features are constantly being removed
; And the setting changes of php.ini can reflect considerable changes,
; Before using a new PHP version, it would be beneficial to study php.ini
;;;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;;;;;;
; This file controls many aspects of PHP. In order for PHP to read this file, it must be named
; 'php.ini'. PHP will search for the file in these places: the current working directory; the environment variable PHPRC
; The path specified; the path specified during compilation.
; Under Windows, the path when compiling is the Windows installation directory.
; In command line mode, the search path of php.ini can be replaced with the -c parameter.
; The syntax of this file is very simple. Whitespace characters and lines starting with a semicolon ';' are simply ignored (as you might
; Same as you guessed). Chapter titles (eg: [Foo]) are also simply ignored, even though they may be
in the future
; has some meaning.
;
; directives are specified using the following syntax:
; directive identifier = value
; directive = value
; Indicates that the identifier is *case-sensitive* - foo=bar is different from FOO = bar.
;
; The value can be a string, a number, a PHP constant (such as: E_ALL or M_PI),
in INI constant
; A (On, Off, True, False, Yes, No and None) , or an expression
; (eg: E_ALL & ~E_NOTICE), or a quoted string ("foo").
;
; INI file expressions are restricted to bitwise operators and parentheses.
; | bitwise OR
; & bitwise AND
; ~ bitwise NOT
; ! boolean NOT
;
; Boolean flags can be turned on with values 1, On, True or Yes.
; They can be turned off using the values 0, Off, False or No.
;
; An empty string can be represented by nothing after the equal sign, or by using the None keyword:
;
; foo = ; Set foo to an empty string
; foo = none ; Set foo to an empty string
; foo = "none" ; Set foo to the string 'none'
;
; If you use constants in value settings, and these constants belong to dynamically loaded extension libraries (not PHP extensions, that is
; Zend extensions), you can only use these constants *after* the lines that call in those extensions.
;
; All values set in the php.ini-dist file are the same as the built-in default values (that is, if php.ini
; is not used or you deleted these lines, the default value is the same).
;;;;;;;;;;;;;;;;;;;;;;
; Language options ;
;;;;;;;;;;;;;;;;;;;;;;
engine = On
; Make the PHP scripting language engine available under Apache.
short_open_tag = On
; Allow tags to be recognized.
asp_tags = Off
; Allow ASP-style tags
precision = 14
; The number of significant digits when displaying floating point type numbers
y2k_compliance = Off
; Whether to turn on Year 2000 adaptation (may cause problems in non-Y2K compliant browsers)
output_buffering = Off
; Output caching allows you to send header (including cookies) lines even after outputting the body content
; The price is that the output layer slows down a little. You can use output caching to turn on output caching at runtime,
; Or turn the directive On here to enable output caching for all files.
output_handler = ; You can redirect all output of your script to a function,
; That might be useful for processing or logging it.
; For example, if you set this output_handler to "ob_gzhandler",
; then the output will be transparently compressed for browsers that support gzip or deflate encoding.
; Set an output processor to automatically open output buffering.
implicit_flush = Off
; Force flush to tell PHP to tell the output layer to automatically refresh its own data after each output block.
; This is equivalent to calling the flush() function after every print() or echo() call and after every HTML block.
; Turning this setting on can cause serious runtime conflicts, and it is recommended to turn it on only during debugging.
allow_call_time_pass_reference = On
; Whether to force parameters to be passed by reference when calling functions. This method was met with protest,
; and may no longer be supported in future versions of PHP/Zend.
; It is encouraged to specify which parameters are passed by reference in the function declaration.
; You are encouraged to try turning this option off and confirm that your scripts still work properly to ensure future versions of the language
; They still work. (You will get a warning every time you use this feature, and the parameters will be by value rather than by reference
; pass).
; Safe Mode Safe Mode
safe_mode = Off
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
; ? Setting certain environment variables
; ? may be a potential security breach.
; This directive contains a comma-separated list of prefixes. In safe mode, users can only replace
; The value of an environment variable starting with the prefix listed here.
; By default, users will only be able to set environment variables starting with PHP_ (eg: PHP_FOO=BAR).
; Note: If this directive is empty, PHP will let the user change any environment variables!
safe_mode_protected_env_vars = LD_LIBRARY_PATH
; This directive contains a comma-separated list of environment variables that the end user will not be able to change using putenv ().
; These variables are protected even when safe_mode_allowed_env_vars is set to allowed.
disable_functions =
; This directive allows you to disable specific functions for security reasons.
; It accepts a comma separated list of function names.
; This directive is *not* affected by whether safe mode is turned on.
; Color of syntax highlighting mode.
; As long as it is acceptable, it will work.
highlight.string = #DD0000
highlight.comment = #FF8000
highlight.keyword = #007700
highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000
; Misc
expose_php = Off
; Determines whether PHP should indicate the fact that it is installed on the server (e.g. add it —PHP— to the web service
; on the signal sent).
; (My personal opinion is to turn this off when any power-by header appears.)
; It poses no security threat, but it makes it possible to check whether PHP is installed on your server.
;;;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;;;
max_execution_time = 30 ; Maximum execution time of each script, in seconds
memory_limit = 8388608 ; The maximum amount of memory that can be used by a script (here is 8MB)
[Assertion]
; ? ? ? ? ?
;assert.active = On ; ? assert(expr); active by default
;assert.warning = On ; issue a PHP warning for each failed assertion.
;assert.bail = Off ; don't bail out by default.
;assert.callback = 0 ; user-function to be called if an assertion fails.
;assert.quiet_eval = 0 ; eval the expression with current error_reporting(). set to true if you want error_reporting(0) around the eval().
[Ingres II]
ii.allow_persistent = On ; Allow or disable persistent connections
ii.max_persistent = -1; Maximum number of persistent connections. -1 means unlimited
ii.max_links = -1 ; Maximum number of connections (persistent and non-persistent). -1 means unlimited
ii.default_database = ; default database (format : [node_id::]dbname[/srv_class]
ii.default_user = ; default user
ii.default_password = ; default password
[Verisign Payflow Pro]
pfpro.defaulthost = "test.signio.com" ; Default Signio server
pfpro.defaultport = 443; Default port for connection
pfpro.defaulttimeout = 30 ; Default timeout in seconds
; pfpro.proxyaddress = ; Default proxy IP address (if needed)
; pfpro.proxyport = ; Default proxy port
; pfpro.proxylogon = ; Default proxy login (logon username)
; pfpro.proxypassword = ; Default proxy password
[Sockets]
sockets.use_system_read = On; Use the system's read() function instead of the php_read() package
; Local Variables: (local variables)
; tab-width: 4
; End