2013年12月11日 09:21:58

; The syntax of the file is extremely simple.  Whitespace and lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.

php.ini 的语法非常简单,空白和以分号开头的行都会被忽略掉(估计你也这样想),段落标识符也会被忽略,即便这个标识符表达了某种意思

根据上面的说法:

1.(指令)段落的标识符写的时候可以不注意大小写([Xdebuge],[xdebuge])

2.配置命令可以写在配置文件的任何地方

; Directives following the section heading [PATH=/www/mysite] only
; apply to PHP files in the /www/mysite directory. Directives
; following the section heading [HOST=www.example.com] only apply to
; PHP files served from www.example.com. Directives set in these
; special sections cannot be overridden by user-defined INI files or
; at runtime. Currently, [PATH=] and [HOST=] sections only work under
; CGI/FastCGI.

有两个段落标识符很特殊,特殊在只能在cgi/fastcgi下起作用:
[PATH=....]

[HOST=....]

path段里的指令集只适用于指定的路径的php脚本文件

host段里的指令集只使用于指定的域名下的php脚本文件

注:Apache可以选择PHP是否工作在fastcgi模式下,nginx下的PHP只能在fastcgi模式下工作

; Directive names are *case sensitive* - foo=bar is different from FOO=bar.

指令的name区分大小写

; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a
; previously set variable or directive (e.g. ${foo})

指令的value可以是:
字符串,数字,双引号包围的字符串

PHP常量,INI常量

表达式,引用已经定义过的变量或指令

; Boolean flags can be turned on using the values 1, On, True or Yes.
; They can be turned off using the values 0, Off, False or No.

布尔类型的变量

On, True, Yes 会被转化成1;
Off, False, No 会被转化为0;

php配置文件语法的更多相关文章

  1. java日志框架系列(4):logback框架xml配置文件语法

    1.xml配置文件语法 由于logback配置文件语法特别灵活,因此无法用DTD或schema进行定义. 1.配置文件基本结构 配置文件基本结构:以<configuration>标签开头, ...

  2. Nginx配置文件语法教程

    Nginx的配置文件在一开始可能真的不太好理解,就像当初开始使用Apache那样,像JSON但却不是.可以说是Nginx的一种专门语言,仅为Nginx服务的. 市面上基本都是写了一点不写一点的教程,基 ...

  3. Apache httpd.conf 配置文件语法验证

    Apache 的 httpd.conf文件改动之后,必须重新启动server才干生效. 有时server在提供服务的时候,直接更改配置,重新启动服务.会带来非常大的危急性. 假设能在改动配置之后,先验 ...

  4. Springboot:属性常量赋值以及yml配置文件语法(四)

    方式一: 注解赋值 构建javaBean:com\springboot\vo\Dog 1:@Component:注册bean到spring容器中 2:添加get set toString方法 3:使用 ...

  5. nginx之启停操作及配置文件语法检测

    nginx的启停操作 ----nginx  启动 ----nginx -s stop 停止 ----nginx -s reload 重新加载 nginx -t 修改配置文件之后进行语法检验

  6. nginx配置文件语法高亮显示方法

    1.去官方站点下载nginx.vim http://www.vim.org/scripts/script.php?script_id=1886 2.创建nginx.vim的存放目录 # mkdir - ...

  7. vim 支持 nginx配置文件 语法高亮

    1.下载 nginx.vim 语法高亮文件 2.将文件复制到 /usr/share/vim/vim74/syntax 目录(也可以是 单用户目录 ~/.vim/syntax/) 3.修改 vim /u ...

  8. nginx配置文件语法高亮

    下载文件 nginx.vim https://vim.sourceforge.io/scripts/script.php?script_id=1886 安装 下载 nginx.vim 文件到 ~/.v ...

  9. Apache检查配置文件语法

    Windows环境:httpd -t或者: httpd.exe -w -t -f "C:\Apache2.2\conf\httpd.conf" -d "C:\Apache ...

随机推荐

  1. Go to the first line OR the last line of the file

    (1) 跳到首行 :1 或 gg (2)跳到最后一行 :$ 或 G 或shift+g(大写.当前若大小写锁定直接按g,未锁定则按shift+g)

  2. 【POJ 1062】昂贵的聘礼(最短路)

    Dijkstra最短路,每次限制一个等级差,再更新答案. #include <cstdio> #define N 105 #define INF 1e9 int m, n; int p[N ...

  3. 【转】从Go、Swift语言出发

    Google于2009年第一次提出了Go的构思,Facebook在去年春天引入了Hack,随后不久Apple也发布了其Swift语言. 在战争中,胜利者写历史书:在科技中,赢的公司都在写编程语言.互联 ...

  4. Oracle定时执行存储过程

    首先查看 SQL> show parameter job NAME                                 TYPE        VALUE-------------- ...

  5. SpringMVC配置数据库连接池

    http://www.cnblogs.com/coqn/archive/2012/08/15/SpringMvc%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA%E9%85%8 ...

  6. OPENSSL编程入门学习

    相关学习资料 http://bbs.pediy.com/showthread.php?t=92649 https://www.openssl.org https://www.google.com.hk ...

  7. SQL localdb 连接字符串

    http://blog.csdn.net/greystar/article/details/47699797 原来SQL 2012 下连接LOCALDB,字符串为: Data Source=(Loca ...

  8. Message

    * Defines a message containing a description and arbitrary data object that can be* sent to a {@link ...

  9. .NET平台上的Memcached客户端介绍

    早上接到一个任务,需要对Linux服务器的Memcached的update操作进行性能测试,我发现我是一个典型的“手里拿着锤子, 就把所有问题都当成钉子”的人.我第一个念头就是,上Memcached的 ...

  10. H2Database数据类型

    数据类型   整数(INT) 布尔型(BOOLEAN) 微整数(TINYINT) 小整数(SMALLINT) 大整数(BIGINT) 标识符(IDENTITY) 货币数(DECIMAL) 双精度实数( ...