Home php教程 php手册 php配置文件php.ini的中文注释版

php配置文件php.ini的中文注释版

Jun 21, 2016 am 08:54 AM
php

这个文件控制了PHP许多方面的观点。为了让PHP读取这个文件,它必须被命名为

; ´php.ini´。PHP 将在这些地方依次查找该文件:当前工作目录;环境变量PHPRC

; 指明的路径;编译时指定的路径。

; 在windows下,编译时的路径是Windows安装目录。

; 在命令行模式下,php.ini的查找路径可以用 -c 参数替代。

; 该文件的语法非常简单。空白字符和用分号´;´开始的行被简单地忽略(就象你可能

; 猜到的一样)。 章节标题(例如 : [Foo])也被简单地忽略,即使将来它们可能

; 有某种的意义。

;

; 指示被指定使用如下语法:

; 指示标识符 = 值

; directive = value

; 指示标识符 是 *大小写敏感的* - foo=bar 不同于 FOO = bar。

;

; 值可以是一个字符串,一个数字,一个 PHP 常量 (如: E_ALL or M_PI), INI 常量中的

; 一个 (On, Off, True, False, Yes, No and None) ,或是一个表达式

; (如: E_ALL & ~E_NOTICE), 或是用引号括起来的字符串("foo").

;

; INI 文件的表达式被限制于位运算符和括号。

; bitwise OR

; & bitwise AND

; ~ bitwise NOT

; ! boolean NOT

;

; 布尔标志可用 1, On, True or Yes 这些值置于开的状态。

; 它们可用 0, Off, False or No 这些值置于关的状态。

;

; 一个空字符串可以用在等号后不写任何东西表示,或者用 None 关键字:

;

; foo = ; 将foo置为空字符串

; foo = none ; 将foo置为空字符串

; foo = "none" ; 将foo置为字符串´none´

;

; 如果你值设置中使用常量,而这些常量属于动态调入的扩展库(不是 PHP 的扩展,就是

; Zend 的扩展),你仅可以调入这些扩展的行*之后*使用这些常量。

;

; 所有在 php.ini-dist 文件里设定的值与内建的默认值相同(这是说,如果 php.ini

; 没被使用或者你删掉了这些行,默认值与之相同)。

;;;;;;;;;;;;;;;;;;;;

; 语言选项 ;

;;;;;;;;;;;;;;;;;;;;

engine = On

; 使 PHP scripting language engine(PHP 脚本语言引擎)在 Apache下有效。

short_open_tag = On

; 允许 <? 标识(这种简单表示)。否则 仅有 <?php and <script> tags 将被识别。

asp_tags = Off

; 允许ASP-style <% %> tags

precision = 14

; 浮点类型数显示时的有效位数

y2k_compliance = Off

; 是否打开 2000年适应 (可能在非Y2K适应的浏览器中导致问题)

output_buffering = Off

; 输出缓存允许你甚至在输出正文内容之后发送 header(标头,包括cookies)行

; 其代价是输出层减慢一点点速度。你可以使用输出缓存在运行时打开输出缓存,

; 或者在这里将指示设为 On 而使得所有文件的输出缓存打开。

implicit_flush = Off

; 强制flush(刷新)让PHP 告诉输出层在每个输出块之后自动刷新自身数据。

; 这等效于在每个 print() 或 echo() 调用和每个 HTML 块后调用flush()函数。

; 打开这项设置会导致严重的运行时冲突,建议仅在debug过程中打开。

allow_call_time_pass_reference = On

; 是否让强迫函数调用时按引用传递参数。这一方法遭到抗议,

; 并可能在将来版本的PHP/Zend里不再支持。

; 受到鼓励的指定哪些参数按引用传递的方法是在函数声明里。

; 你被鼓励尝试关闭这一选项并确认你的脚本仍能正常工作,以保证在将来版本的语言里

; 它们仍能工作。(你将在每次使用该特点时得到一个警告,而参数将按值而不是按引用

; 传递)。

; 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.

; 该指示包含用逗号分隔的前缀列表。安全模式中,用户仅可以替换

; 以在此列出的前缀开头的环境变量的值。

; 默认地,用户将仅能 设定以PHP_开头的环境变量,(如: PHP_FOO=BAR)。

; 注意: 如果这一指示为空,PHP 将让用户更改任意环境变量!

safe_mode_protected_env_vars = LD_LIBRARY_PATH

; 这条指示包含一个用逗号分隔的环境变量列表,那是最终用户将不能用putenv () 更改的。

; 这些变量甚至在safe_mode_allowed_env_vars 设置为允许的情况下得到保护。

disable_functions =

; 这条指示让你可以为了安全的原因让特定函数失效。

; 它接受一个用逗号分隔的函数名列表。

; 这条指示 *不受* 安全模式是否打开的影响。

; 语法高亮模式的色彩。

; 只要能被<font color=???>接受的东西就能工作。

highlight.string = #DD0000

highlight.comment = #FF8000

highlight.keyword = #007700

highlight.bg = #FFFFFF

highlight.default = #0000BB

highlight.html = #000000

; Misc 杂项

expose_php = Off

; 决定 PHP 是否标示它装在服务器上的事实(例如:加在它 —PHP—给Web服务

; 发送的信号上)。

; (我个人的意见,在出现什么power-by的header的时候,把这关掉。)

; 它不会有安全上的威胁, 但它使检查你的服务器上是否安装了PHP成为了可能。

1 2 3 4 5 下一页 >全文阅读

提示:试试"← →"键,翻页更方便哦!



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 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)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

7 PHP Functions I Regret I Didn't Know Before 7 PHP Functions I Regret I Didn't Know Before Nov 13, 2024 am 09:42 AM

If you are an experienced PHP developer, you might have the feeling that you’ve been there and done that already.You have developed a significant number of applications, debugged millions of lines of code, and tweaked a bunch of scripts to achieve op

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

PHP Program to Count Vowels in a String PHP Program to Count Vowels in a String Feb 07, 2025 pm 12:12 PM

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

What are PHP magic methods (__construct, __destruct, __call, __get, __set, etc.) and provide use cases? What are PHP magic methods (__construct, __destruct, __call, __get, __set, etc.) and provide use cases? Apr 03, 2025 am 12:03 AM

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.

See all articles