gpt4 book ai didi

php - Azure Web App 的 phpinfo 中显示的 PHP 版本错误

转载 作者:行者123 更新时间:2023-12-03 01:06:59 26 4
gpt4 key购买 nike

当从 Azure 门户将我的 Azure Web 应用程序上的 PHP 版本从 5.6 更改为 7.1 时,将会成功。但是当我从 php 文件运行 phpinfo() 时,它仍然显示旧版本的 PHP 5.6.31.. 而且我上传到 Azure Web App 的代码不理解 7.1 的更改..

我已从 Azure CLI 更新了 PHP 版本并重新启动了服务器。但运气不好:(还有其他人可以尝试其他选择吗?

enter image description here

enter image description here

最佳答案

我无法重现此行为,但您可以尝试几个选项。

选项 1:

使用以下值向处理程序映射添加一行:

扩展名:*.php

处理器路径:D:\Program Files (x86)\PHP\v7.1\php-cgi.exe

enter image description here

选项 2:

创建一个 web.config 文件并将其放入您网站的根文件夹中。

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<handlers>
<add name="FastCGIHandler" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="D:\Program Files (x86)\PHP\v7.1\php-cgi.exe" />
</handlers>
</system.webServer>
</configuration>
<小时/>

所有预装的 PHP 运行时都可以在 D:\Program Files (x86)\PHP (x86) 和 D:\Program Files\PHP (x64) 中找到)。

enter image description here

关于php - Azure Web App 的 phpinfo 中显示的 PHP 版本错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45670812/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com