phpプロファイル構文
3088 ワード
2013年12月11日09:21:58
php.iniの文法は非常に簡単で、空白とセミコロンで始まる行は無視され(あなたもそう思うと思います)、段落識別子も無視されます.この識別子が何らかの意味を表していても
上記の言い方によれば、
1.(命令)段落の識別子を書くときは大文字小文字に注意しなくてもよい([Xdebuge],[xdebuge])
2.構成コマンドは、プロファイルのどこにでも書くことができます.
2つの段落識別子が特殊で、cgi/fastcgiでのみ使用できます:[CATH=....]
[HOST=....]
pathセグメントのコマンドセットは、指定したパスのphpスクリプトファイルにのみ適用されます.
hostセグメントのコマンドセットは、指定したドメイン名のphpスクリプトファイルのみを使用します.
注意:ApacheはPHPがfastcgiモードで動作するかどうかを選択できます.nginxのPHPはfastcgiモードでのみ動作します.
命令のnameは大文字と小文字を区別する
命令のvalueは、文字列、数値、二重引用符で囲まれた文字列であってもよい.
PHP定数、INI定数
定義された変数または命令を参照する式
ブール型の変数
On,True,Yesは1に変換されます.Off,False,Noは0に変換されます.
; 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.
2つの段落識別子が特殊で、cgi/fastcgiでのみ使用できます:[CATH=....]
[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に変換されます.