Home Backend Development PHP Tutorial Detailed explanation of php.ini_PHP tutorial

Detailed explanation of php.ini_PHP tutorial

Jul 13, 2016 pm 05:39 PM
php php.ini for Encyclopedia it control document View Detailed explanation read this

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 specified path; the path specified when compiling.
; 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
; guess). Section titles (eg: [Foo]) are also simply ignored, even though they may
; have some meaning in the future.
;
; instructions are specified using the following syntax:
; directive = value
; directive = value
; directive 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; one (On, Off, True, False, Yes, No and None) , or an expression
; (such as: E_ALL & ~E_NOTICE), or a string enclosed in quotes ("foo").
;
; INI file expressions are restricted to bitwise operators and parentheses.
; | bitwise OR
; & bitwise AND
; ~ bitwise NOT
; ! boolean NOT
;
; Boolean flag available 1, On, True or Yes These values ​​are turned on.
; They can be turned off using the values ​​0, Off, False or No.
;
; An empty string can be represented by writing nothing after the equal sign, or using the None keyword:
;
; foo = ; sets foo to the empty string
; foo = none ; Set foo to an empty string
; foo = "none" ; Set foo to 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 these extensions.
;
; All in php.ini-dist The value set in the file is the same as the built-in default value (that is, if php.ini
; is not used or you delete these lines, the default value is the same).


;;;;;;;;;;;;;;;;;;;;;;
; Language options;
;;;;;;;;;;;;;;;;;;;;;

engine = On
; Enable PHP The scripting language engine (PHP scripting language engine) is available under Apache.
short_open_tag = On
; allows the flag (this simple representation). Otherwise only the tags will be recognized.
asp_tags = Off
; Allow ASP-style <% %> tags
precision = 14
; Number of significant digits when displaying floating point type numbers

y2k_compliance = Off
; Whether to turn on 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 cost is that the output layer slows down a bit. You can use Output Cache to turn on output caching at runtime,
; or set the directive to On here to turn on output caching for all files.

implicit_flush = Off
; Force flush (refresh) to tell PHP to tell the output layer to automatically refresh its own data after each output block.
; This is equivalent to adding a The flush() function is called after each HTML block and print() or echo() call.
; Turning on this setting 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 the function. This method was protested
; and may no longer be supported in future versions of PHP/Zend.
; The encouraged way to specify which parameters are passed by reference is in the function declaration.
; You are encouraged to try turning this option off and confirm that your scripts still work properly in future versions of the language
; They still work. (You will get a warning every time you use this feature, and arguments will be passed by value rather than by reference
;).

; 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.
; The indication 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* supported Whether safe mode is turned on or not.

; Color of syntax highlighting mode.
; As long as it can be
highlight.string = #DD0000
highlight.comment = #FF8000
highlight.keyword = #007700
highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000

; Misc Miscellaneous
expose_php = Off
; Determines whether PHP should indicate the fact that it is installed on the server (for example: by adding it to the -PHP- signal sent to the Web service
;).
; (My personal opinion is to turn this off when any power-by header appears.)
; It will not pose a security threat, But it makes it possible to check whether PHP is installed on your server.


;;;;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; The maximum execution time of each script, in seconds
memory_limit = 8388608; The maximum total amount of memory that can be used by a script (here is 8MB)


;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging;
; Error handling and logging;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;
; Error reporting is bitwise. Or add up the numbers to get the desired error reporting level.
; E_ALL - all errors and warnings
; E_ERROR - fatal runtime error
; E_WARNING - runtime warning (non-fatal error)
; E_PARSE - compile-time parsing error
; E_NOTICE - runtime reminder (these are often caused by bugs in your code,
; may also be caused by intentional behavior. (e.g. based on uninitialized changes) The fact that the variable is automatically initialized to an
; empty string while using an uninitialized variable)

; E_CORE_ERROR - Fatal error that occurs during the initialization process of PHP startup
; E_CORE_WARNING - warning (non-fatal error) that occurs during the initialization process of PHP startup
; E_COMPILE_ERROR - fatal compile-time error
; E_COMPILE_WARNING - compile-time warning (non-fatal error)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - User generated reminder message
; Example:
; error_reporting = E_ALL & ~E_NOTICE ; Show all errors except reminders
; error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR ; Show errors only
error_reporting = E_ALL & ~E_NOTICE ; Display all errors except reminders
display_errors = On ; Display error messages (as part of the output)
; On the final published web site, it is strongly recommended that you turn this feature off and use the
; error log instead (see below).
; It is possible to continue to enable display_errors in the final published website
; Expose some security-related information, such as file paths on your web service,
; your database layout or other information.

log_errors = Off ; Record errors in the log file (server-specified log, stderr standard error output, or error_log (below))
; As noted above, it is strongly recommended that you log errors
; instead of direct error output on the final published website.

track_errors = Off ; Save the latest error/warning message in variable $php_errormsg (boolean)
;error_prepend_string = "<font color=ff0000>" ; The string output before the error message
;error_append_string = "</font>" ; The string output after the error message
;error_log = filename ; Record the error log in the specified file
;error_log = syslog; Record error log in system log syslog (event log under NT, invalid under Windows 95)
warn_plus_overloading = Off ; Warn when using ' ' with string


;;;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;;
variables_order = "EGPCS" ; This directive describes the PHP record
; GET, POST, Cookie, Environment and Built-in in the order of these variables.
; (with G, P, C, E & S stands for, usually quoted in EGPCS or GPC terms).
; Records from left to right, with new values ​​replacing old ones.

register_globals = On ; Whether to register these EGPCS variables as global variables.
; You may want to turn this off if you don't want user data to be cluttered globally.
; This makes more sense in conjunction with track_vars — that way you can access all GPC variables via the
; $HTTP_*_VARS[] array.

register_argc_argv = On; This instruction tells PHP whether to declare argv and argc variables
; (Note: here argv is an array and argc is the number of variables)
; (Contains data passed using the GET method).
; If you don't want to use these variables, you should turn them off to improve performance.

track_vars = On ; Make the $HTTP_*_VARS[] array valid, where * is replaced with
; ENV, POST, GET, COOKIE or SERVER when using

gpc_order = "GPC" ; This directive was objected to. Use variables_order instead.

; Magic quotes
magic_quotes_gpc = On ; Use magic quotes in the input GET/POST/Cookie data
; (The original text is like this, haha, so-called magic quotes It should refer to using escape characters to add quotation control characters, such as ´....)
magic_quotes_runtime

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486255.htmlTechArticleThis document controls many aspects of PHP. In order for PHP to read this file, it must be named ; acute;php.iniacute;. PHP will look for the file in these places: Current job...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1665
14
PHP Tutorial
1269
29
C# Tutorial
1249
24
PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

The Enduring Relevance of PHP: Is It Still Alive? The Enduring Relevance of PHP: Is It Still Alive? Apr 14, 2025 am 12:12 AM

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP vs. Python: Understanding the Differences PHP vs. Python: Understanding the Differences Apr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP and Python: Code Examples and Comparison PHP and Python: Code Examples and Comparison Apr 15, 2025 am 12:07 AM

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP vs. Other Languages: A Comparison PHP vs. Other Languages: A Comparison Apr 13, 2025 am 12:19 AM

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

See all articles