我已经在 Windows 10 计算机上安装了 PHP,并启动了 IIS。
但当我浏览到http://localhost/phpinfo.hml
页面时却完全空白。
如果我查看 IIS 中的文件视图,它似乎并不知道该文件存在。
我已经验证 phpinfo.html 文件位于正确的位置:
ls -l C:\inetpub\wwwroot\phpinfo.html
Directory: C:\inetpub\wwwroot
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 7/16/2020 8:54 AM 72 phpinfo.html
并且有正确的内容:
PS C:\inetpub\wwwroot> cat .\phpinfo.html
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
PHP 已安装:
php --version
PHP 7.4.1 (cli) (built: Dec 17 2019 19:23:59) ( NTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
我给了我的 Windows 用户对该目录的完全访问权限。我究竟做错了什么?我怎样才能让它发挥作用?
慕虎7371278