2017-08-14 71 views
0

當我從Azure門戶的Azure Web應用程序將PHP版本從5.6更改爲7.1時,將成功。但是當我從一個php文件運行phpinfo()時,它仍然向我展示PHP的舊版本5.6.31。另外,我上傳到Azure Web App的代碼不理解7.1更改..錯誤的PHP版本顯示在phpinfo Azure Web應用程序

我已經從Azure CLI更新了PHP版本並重新啓動了服務器。但沒有運氣:(沒有任何人有另一種選擇來試試呢?

enter image description here

enter image description here

回答

1

我不能重現此問題,但您可以嘗試幾個選項。

選項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(86)和D:\Program Files\PHP(64)。

enter image description here

+0

你是對的!在web.config文件中,我有PHP 5.6 ...將其更改爲7.1,我工作! – Flappy

相關問題