2022-11-23 21:11:42265浏览
我们有些同学一直想在vscode运行php代码,今天我就来带各位同学一块配置。
报错问题:
提示:PHP executable not fouund. install PHP and add it ro your PATH or set the php.debug.executablePath string
![](https://docimg6.docs.qq.com/image/AgAACkH8ss6qug0RRPtHoLK_q109SEpl.png?w=578&h=135)
![](https://docimg3.docs.qq.com/image/AgAACkH8ss5R2wH4yeZE0Y2421BFOkR8.png?w=1134&h=889)
首先要有PHP的程序,不管是phpstudy还是自己下载的PHP程序。
解决办法:点击右下角“Open settings”(打开设置)
配置PHP路径
比如phpstudy的路径是E:\phpstudy_pro
php的程序路径是E:\phpstudy_pro\Extensions\php,在这个下面找一个版本(一般是用PHP7,任何一般版本都可以),完整路径填进去:
斜杠全部用双斜杠代替:
php.debug.executablePath:"E:\phpstudy_pro\Extensions\php\php7.3.4nts\php.exe"
![](https://docimg9.docs.qq.com/image/AgAACkH8ss625nw5-mJIN7C52MfnidCI.png?w=639&h=174)
问题反馈