今天需要切換到PHP7.4以上的版本,然后我就切換到PHP7.4.3版本
當我在cmd運行一下代碼的時候,報錯:
C:\Users\Think>php -v
PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0
注意看報錯信息,是缺失還是與PHP版本不兼容
丟失請參考:https://blog.csdn.net/damountain/article/details/78161072
這里講不兼容的問題,很好解決,原因是PHP 7.4.x需要用於Visual Studio 2019的Microsoft Visual C ++ Redistributable
可在此處下載:
進去之后向下滾動→其他工具和框架→Microsoft Visual C++ Redistributable for Visual Studio 2019→選擇你對應的版本下載,我這里選擇的是64位的
https://visualstudio.microsoft.com/downloads/
下載之后安裝,重啟電腦就可以了