search
HomeBackend DevelopmentPHP TutorialStrongly recommended: php.ini Chinese version (2)_PHP tutorial

Strongly recommended: php.ini Chinese version (2)_PHP tutorial

Jul 21, 2016 pm 04:08 PM
httpphp.iniChinese Versionrecommendarrayefficientuse




track_vars = On; Make the $HTTP_*_VARS[] array valid, where * is replaced with
; ENV, POST, GET, COOKIE or SERVER when used.
post_max_size = 8M; The maximum size of POST data that PHP will accept.


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, the so-called magic quotes should refer to using escape characters Added to reference control characters, such as '....)
magic_quotes_runtime= Off; Use magic quotes for data generated during runtime,
; For example: use exec() to query data obtained by SQL The data obtained by the function, etc.
magic_quotes_sybase = Off; Use Sybase-style magic quotes (use 'extract' instead of ')

; Automatically add files before and after the PHP document
auto_prepend_file =
auto_append_file =

; Like 4.04b4, PHP always outputs the encoding of a character in the "Content-type:" header by default.
; Disables the output character set as long as it is set to empty.
; PHP's built-in default is text/html
default_mimetype = "text/html"
;default_charset = "iso-8859-1"

;;;;;;; ;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;

include_path = ; include path settings, UNIX: "/path1:/path2" Windows: "path1;path2"
doc_root = ; The root path of the php page, only valid when it is not empty
user_dir = ; Tell php which directory to look for when opening the script with /~username, only when it is not empty Valid
; upload_tmp_dir = ; Temporary directory to store files uploaded using HTTP protocol (use the system default if not specified)
upload_max_filesize = 2097152; File upload is limited to 2 Meg by default
extension_dir = c: php; Directory where loadable extension libraries (modules) are stored
enable_dl = On; Whether to enable dl().
; The dl() function *doesn't* work well on multi-threaded servers,
; such as IIS or Zeus, and is disabled by default on them



; File Uploads ;

file_uploads = On ; Whether to allow HTTP file upload
;upload_tmp_dir = ; Temporary directory for HTTP uploaded files (if not specified, the system default is used)
upload_max_filesize = 2M ; Maximum allowed size of uploaded files

; Fopen wrappers ;

allow_url_fopen = On ; Whether to allow URLs to be treated as http:.. or files as ftp:...

; Dynamic Extensions;

; If you want an extension library to be loaded automatically, use the following syntax:
; extension=modulename.extension
; For example, On Windows,
; extension=msql.dll
; or on UNIX,
; extension=msql.so
; Note that this should only be the name of the module, no directory information is required. inside.
; Use the extension_dir directive above to specify the location of the extension library.


;Windows Extensions
;extension=php_nsmail.dll
extension=php_calendar.dll
;extension=php_dbase.dll
;extension=php_filepro.dll
extension=php_gd.dll
;extension=php_dbm.dll
;extension=php_mssql.dll
;extension=php_zlib.dll
;extension=php_filepro.dll
;extension=php_imap4r2.dll
;extension=php_ldap.dll
;extension=php_crypt.dll
;extension=php_msql2.dll
;extension=php_odbc.dll
; Note that MySQL support is now built-in , therefore, there is no need to use its dll



; Module Settings; Off ; Whether to define various system log variables
; such as: $LOG_PID, $LOG_CRON, etc.
; Turning it off is a good idea to increase efficiency.
; When running, you can call the function define_syslog_variables() to define these variables


[mail function]
SMTP = localhost; only for win32 systems
sendmail_from = me @localhost.com ;Only for win32 system
;sendmail_path = ;Only for unix, also supports parameters (the default is 'sendmail -t -i')
[Debugger]
debugger.host = localhost
debugger.port = 7869
debugger.enabled = False

[Logging]
; These configurations indicate the logging mechanism used for the example.
; See examples/README.logging for more explanation
; logging.method = db
; logging.directory = /path/to/log/directory

[Java]
;java.class.path = .php_java.jar
;java.home = c:jdk
;java.library = c:jdkjrebinhotspotjvm.dll
;java.library.path = .

[SQL]
sql.safe_mode = Off

[ODBC]
;uodbc.default_db = Not yet implemented
;uodbc.default_user = Not yet implemented
;uodbc.default_pw = Not yet implemented
uodbc.allow_persistent = On ; Allow or disable persistent connections
uodbc.check_persistent = On ; Check if the connection is still available before reusing
uodbc.max_persistent = -1 ; Persistent The maximum number of connections. -1 means unlimited
uodbc.max_links = -1 ; Maximum number of connections (persistent and non-persistent). -1 represents unlimited
uodbc.defaultlrl = 4096; Controls LONG type fields. Returns the number of bytes of the variable, 0 means pass (?) 0 means passthru
uodbc.defaultbinmode = 1; Control binary data.0 represents Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char
; See the documentation for odbc_binmode and odbc_longreadlen for an explanation of uodbc.defaultlrl and uodbc.defaultbinmode.

[MySQL]
mysql.allow_persistent = On ; Allow or disable persistent connections
mysql.max_persistent = -1 ; The maximum number of persistent connections. -1 represents unlimited
mysql.max_links = -1 ; Maximum number of connections (persistent and non-persistent). -1 represents unlimited
mysql.default_port = ; The default port used by mysql_connect(). If not set, mysql_connect()
; will use the variable $MYSQL_TCP_PORT, or the mysql-tcp entry under /etc/services (unix),
; or MYSQL_PORT that is defined during compilation (in this order)
; Win32 environment, will only check MYSQL_PORT.
mysql.default_socket = ; The default socket name used for local MySql connections. If empty, use the MYSQL built-in value

mysql.default_host = ; the host used by mysql_connect() by default (invalid in safe mode)
mysql.default_user = ; the user name used by mysql_connect() by default (safe)
mysql.default_password = ; The password used by mysql_connect() by default (invalid in safe mode)
; Note that saving passwords in this file is usually a *bad* idea
; *Any *Users with PHP access can run
; 'echo cfg_get_var("mysql.default_password")' to display that password!
; And of course, any user with read rights to the file can also see that password.

[mSQL]
msql.allow_persistent = On ; Allow or disable persistent connections
msql.max_persistent = -1 ; Maximum number of persistent connections. -1 means unlimited
msql.max_links = -1 ; Maximum number of connections (persistent and non-persistent). -1 represents unlimited

[PostgresSQL]
pgsql.allow_persistent = On ; Allow or prohibit persistent connections
pgsql.max_persistent = -1 ; The maximum number of persistent connections. -1 means unlimited
pgsql.max_links = -1 ; Maximum number of connections (persistent and non-persistent). -1 represents unlimited

[Sybase]
sybase.allow_persistent = On ; Allow or prohibit persistent connections
sybase.max_persistent = -1 ; The maximum number of persistent connections. -1 represents unlimited
sybase.max_links = -1 ; Maximum number of connections (persistent and non-persistent). -1 represents unlimited
;sybase.interface_file = "/usr/sybase/interfaces"
sybase.min_error_severity = 10; The minimum severity of the displayed error
sybase.min_message_severity = 10; The minimum severity of the displayed message Minimum importance
sybase.compatability_mode = Off ; Mode compatible with older versions of PHP 3.0. If turned on, this will cause PHP to automatically
; assign them the Sybase type based on the results,
; rather than treating them all as strings.
; This compatibility mode won't last forever,
; so make the necessary changes to your code,
; and turn it off.

[Sybase-CT]
sybct.allow_persistent = On ; Allow or disable persistent connections
sybct.max_persistent = -1 ; Maximum number of persistent connections. -1 means unlimited
sybct.max_links = -1 ; Maximum number of connections (persistent and non-persistent). -1 means unlimited
sybct.min_server_severity = 10 ; Minimum severity of errors shown
sybct.min_client_severity = 10 ; Minimum severity of messages shown

[bcmath]
bcmath .scale = 0 ; number of decimal digits for all bcmath functions

[browscap]
;browscap = extra/browscap.ini
browscap = C:WINSYSTEMinetsrvbrowscap.ini
[Informix]
ifx.default_host = ; The host used by ifx_connect() by default (invalid in safe mode)
ifx.default_user = ; The user name used by ifx_connect() by default ( Invalid in safe mode)
ifx.default_password = ; Password used by ifx_connect() by default (invalid in safe mode)
ifx.allow_persistent = On ; Allow or disable persistent connections
ifx.max_persistent = -1 ; The maximum number of persistent connections. -1 means unlimited
ifx.max_links = -1 ; Maximum number of connections (persistent and non-persistent). -1 represents unlimited
ifx.textasvarchar = 0 ; If turned on, the select status code returns the content of a 'text blob' field instead of its id
ifx.byteasvarchar = 0 ; If turned on, the select status code returns Returns the contents of a 'byte blob' field rather than its id
ifx.charasvarchar = 0 ; Tracks whitespace stripped from a fixed-length character column.
; May work for Informix SE users.
ifx.blobinfile = 0 ; If turned on, the contents of text and byte blobs are exported to a file
; rather than saved to memory.
ifx.nullformat = 0 ; NULL (empty) is returned as a null field, unless set to 1 here.
; In this case (1), NULL is returned as the string NULL.

[Session]
session.save_handler = files; Control method for saving/retrieving data
session.save_path = C:wintemp; Passed to the controller when save_handler is set to a file Parameters,
3

; This is the path where the data file will be saved.
session.use_cookies = 1; Whether to use cookies
session.name = PHPSESSID
; The name of the session used in cookies
session.auto_start = 0; Initialize the session when the request starts
session.cookie_lifetime = 0 ; It is the cookie storage time in seconds,
; or when it is 0, until the browser is restarted
session.cookie_path = / ; The effective path of the cookie
session.cookie_domain = ; Valid domain of cookie
session.serialize_handler = php ; Controller used to connect data
; php is the standard controller of PHP.
session.gc_probability = 1 ; Probability in percent that the 'garbage collection' process
; will be started each time the session is initialized.
session.gc_maxlifetime = 1440 ; After the number of seconds indicated by the number here, the saved data will be considered
; 'garbage' and cleaned up by the gc process.
session.referer_check = ; Check HTTP referrers to invalidate additional ids included in URLs
session.entropy_length = 0 ; How many bytes to read from the file
session.entropy_file = ; Specify here to create a session id
; session.entropy_length = 16
; session.entropy_file = /dev/urandom
session.cache_limiter = nocache; Set to {nocache, private, public} to determine HTTP's
; cache Problem
session.cache_expire = 180; document expires after n minutes
session.use_trans_sid = 1; use transitional sid support if compiled with it enabled
; --enable-trans-sid
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

[MSSQL]
;extension=php_mssql.dll
mssql.allow_persistent = On ; Allow or disable persistent connections
mssql.max_persistent = -1 ; The maximum number of persistent connections. -1 represents unlimited
mssql.max_links = -1 ; Maximum number of connections (persistent and non-persistent). -1 means unlimited
mssql.min_error_severity = 10 ; Minimum severity of errors shown
mssql.min_message_severity = 10 ; Minimum severity of messages shown
mssql.compatability_mode = Off ; Same as older versions of PHP 3.0 compatible mode.

[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 represents 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 system read() Function replacement php_read() encapsulation
; Local Variables: (local variable)
; tab-width: 4
; End:

(Source: Riqioniao)

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/314762.htmlTechArticletrack_vars = On; Make the $HTTP_*_VARS[] array valid, here * is used when using; ENV, POST , GET, COOKIE or SERVER replace post_max_size = 8M; The maximum size of POST data that PHP will accept. gpc_...
Statement
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
How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

How does PHP handle object cloning (clone keyword) and the __clone magic method?How does PHP handle object cloning (clone keyword) and the __clone magic method?Apr 17, 2025 am 12:24 AM

In PHP, use the clone keyword to create a copy of the object and customize the cloning behavior through the \_\_clone magic method. 1. Use the clone keyword to make a shallow copy, cloning the object's properties but not the object's properties. 2. The \_\_clone method can deeply copy nested objects to avoid shallow copying problems. 3. Pay attention to avoid circular references and performance problems in cloning, and optimize cloning operations to improve efficiency.

PHP vs. Python: Use Cases and ApplicationsPHP vs. Python: Use Cases and ApplicationsApr 17, 2025 am 12:23 AM

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

Describe different HTTP caching headers (e.g., Cache-Control, ETag, Last-Modified).Describe different HTTP caching headers (e.g., Cache-Control, ETag, Last-Modified).Apr 17, 2025 am 12:22 AM

Key players in HTTP cache headers include Cache-Control, ETag, and Last-Modified. 1.Cache-Control is used to control caching policies. Example: Cache-Control:max-age=3600,public. 2. ETag verifies resource changes through unique identifiers, example: ETag: "686897696a7c876b7e". 3.Last-Modified indicates the resource's last modification time, example: Last-Modified:Wed,21Oct201507:28:00GMT.

Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1?Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1?Apr 17, 2025 am 12:06 AM

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values ​​to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP: An Introduction to the Server-Side Scripting LanguagePHP: An Introduction to the Server-Side Scripting LanguageApr 16, 2025 am 12:18 AM

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP and the Web: Exploring its Long-Term ImpactPHP and the Web: Exploring its Long-Term ImpactApr 16, 2025 am 12:17 AM

PHP has shaped the network over the past few decades and will continue to play an important role in web development. 1) PHP originated in 1994 and has become the first choice for developers due to its ease of use and seamless integration with MySQL. 2) Its core functions include generating dynamic content and integrating with the database, allowing the website to be updated in real time and displayed in personalized manner. 3) The wide application and ecosystem of PHP have driven its long-term impact, but it also faces version updates and security challenges. 4) Performance improvements in recent years, such as the release of PHP7, enable it to compete with modern languages. 5) In the future, PHP needs to deal with new challenges such as containerization and microservices, but its flexibility and active community make it adaptable.

Why Use PHP? Advantages and Benefits ExplainedWhy Use PHP? Advantages and Benefits ExplainedApr 16, 2025 am 12:16 AM

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

See all articles

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment