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条回答

    报告相同问题?

    悬赏问题

    • ¥15 js调用html页面需要隐藏某个按钮
    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler
    • ¥15 关于#python#的问题:自动化测试
    • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题