'Apache Environment','Environment'和'PHP Variables'有什么区别?

我在运行于的笔记本电脑上使用 PHP 7.2.11 </ strong> Windows 10 Home单语言64位操作系统</ strong>。</ p>

我已安装 PHP 7.2.11 </ strong>和 Apache / 2.4.35 (Win32)</ strong>使用最新版本的 XAMPP for Windows </ strong>。</ p>

我在代码下执行并看到输出到我的网络浏览器中。 我的查询仅基于此输出。</ p>

 &lt;?php phpinfo();  ?&gt; 
</ code> </ pre>

我在标题'Apache Environment'</ strong>和'PHP变量下看到几乎相似的配置变量具有相同的值 “</ strong>即可。 </ p>

出现在'Apache Environment'</ strong>标题下的同一个裸实体名称被封装到标题 $ _ SERVER </ code>超全局数组中 >'PHP变量'</ strong>。</ p>

例如 标题'Apache Environment'</ strong>下的 MIBDIRS </ code>变为 $ _ SERVER ['MIBDIRS'] </ code>,标题为'PHP变量'</ strong >具有相同的价值。

这是出现在两者</ strong>标题下的所有配置变量的情况。 </ p>

我在标题'PHP变量'</ strong>下看到了三个额外的配置变量,它们出现在'Apache Environment'下的配置变量中。 </ p>

以下是这些变量及其值:</ p>

  $ _ SERVER ['PHP_SELF'] /dashboard/phpinfo.php
$_SERVER ['REQUEST_TIME_FLOAT'] 1540099695.445
$ _SERVER ['REQUEST_TIME'] 1540099695
</ code> </ pre>

为什么会这样?</ p>

什么是 配置变量出现在标题'环境'</ strong>下? 是否与标题'Apache Environment'</ strong>和'PHP Variables'</ strong>下的配置变量不同? 这些配置变量的作用是什么?</ p>

在所有三个标题下的配置变量中,配置变量确实出现在 $ _ ENV </ code>超全局数组中?< / p>

在所有三个标题下的所有配置变量中,如果与 getenv()</ code>函数一起使用,则会提供值吗?</ p>

请 以易于理解的语言逐点逐步地回答我的问题。</ p>
</ div>

展开原文

原文

I'm using PHP 7.2.11 on my laptop that runs on Windows 10 Home Single Language 64-bit Operating System.

I've installed PHP 7.2.11 and Apache/2.4.35 (Win32) using the latest version of XAMPP for Windows.

I executed below code and saw the output into my web browser. My queries are based only on this output.

<?php phpinfo(); ?>

I saw almost similar configuration variables with same values under the headings 'Apache Environment' and 'PHP Variables'.

The same bare entity name appearing under the heading 'Apache Environment' got encapsulated into $_SERVER superglobal array under the heading 'PHP Variables'.

E.g. MIBDIRS under the heading 'Apache Environment' becomes $_SERVER['MIBDIRS'] under the heading 'PHP Variables' with same value. This is the case for all configuration variables appearing under both the headings.

I saw three additional configuration variables under the heading 'PHP Variables' which are missing from the configuration variables appearing under 'Apache Environment'.

Following are those variables alongwith their values :

$_SERVER['PHP_SELF']            /dashboard/phpinfo.php
$_SERVER['REQUEST_TIME_FLOAT']  1540099695.445
$_SERVER['REQUEST_TIME']        1540099695

Why so?

What are the configuration variables appearing under the heading 'Environment'? Are the different from the configuration variables appearing under the headings 'Apache Environment' and 'PHP Variables'? What's the role of these configuration variables?

Among all the configuration variables coming under all the three headings which configuration variables does appear inside the $_ENV superglobal array?

Among all the configuration variables coming under all the three headings provide values if used with getenv() function?

Please answer my question in point-wise and step-by-step manner in an easy to understand language.

drqrdkfue521903877
drqrdkfue521903877 我也有同样的问题。你明白了吗?您也知道是否有办法将变量从“ApacheEnvironment”导出到“Environment”?
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐