?? function.apache-getenv.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Get an Apache subprocess_env variable</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.apache-get-version.html">apache_get_version</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.apache-lookup-uri.html">apache_lookup_uri</a></div> <div class="up"><a href="ref.apache.html">Apache Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.apache-getenv" class="refentry"> <div class="refnamediv"> <h1 class="refname">apache_getenv</h1> <p class="verinfo">(PHP 4 >= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">apache_getenv</span> — <span class="dc-title">Get an Apache subprocess_env variable</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">string</span> <span class="methodname"><b><b>apache_getenv</b></b></span> ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$variable</tt></span> [, <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$walk_to_top</tt></span> ] )</div> <p class="para rdfs-comment"> Get an Apache environment variable as specified by <i><tt class="parameter">variable</tt></i>. </p> <p class="para"> This function requires Apache 2 otherwise it's undefined. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">variable</tt></i></span> <dd> <p class="para"> The Apache environment variable </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">walk_to_top</tt></i></span> <dd> <p class="para"> Whether to get the top-level variable available to all Apache layers. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> The value of the Apache environment variable on success, or <b><tt>FALSE</tt></b> on failure </p> </div> <div class="refsect1 examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example"> <p><b>Example #1 <b>apache_getenv()</b> example</b></p> <div class="example-contents"><p> The example above shows how to retrieve the value of the Apache environment variable <var class="varname">SERVER_ADDR</var>. </p></div> <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB"><?php<br />$ret </span><span style="color: #007700">= </span><span style="color: #0000BB">apache_getenv</span><span style="color: #007700">(</span><span style="color: #DD0000">"SERVER_ADDR"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$ret</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?></span></span></code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents"><pre><div class="cdata"><pre>42.24.42.240</pre></div> </pre></div> </div> </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.apache-setenv.html" class="function" rel="rdfs-seeAlso">apache_setenv()</a></li> <li class="member"><a href="function.getenv.html" class="function" rel="rdfs-seeAlso">getenv()</a></li> <li class="member"><a href="language.variables.superglobals.html" class="link">Superglobals</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.apache-get-version.html">apache_get_version</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.apache-lookup-uri.html">apache_lookup_uri</a></div> <div class="up"><a href="ref.apache.html">Apache Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -