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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 永磁型步进电机PID算法
    • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
    • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
    • ¥15 如何处理复杂数据表格的除法运算
    • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
    • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
    • ¥200 uniapp长期运行卡死问题解决
    • ¥15 latex怎么处理论文引理引用参考文献
    • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
    • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?