douchan6512 2018-10-21 06:01
浏览 90

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

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.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 求三轴之间相互配合画圆以及直线的算法
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题
    • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
    • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
    • ¥15 自己瞎改改,结果现在又运行不了了
    • ¥15 链式存储应该如何解决
    • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站