简体   繁体   English

XAMPP; PHP 在非管理员用户的控制台中不可用

[英]XAMPP ; PHP not available in console for non-admin users

I'm using Windows 10. I've installed XAMPP in C:\xampp and added an environmental Path variable C:\xampp\php. I'm using Windows 10. I've installed XAMPP in C:\xampp and added an environmental Path variable C:\xampp\php.

However, the problem is, PHP isn't available to users other than admin.但是,问题是 PHP 对管理员以外的用户不可用。

What can I do to make that pre-installed PHP available to all users?我该怎么做才能使所有用户都可以使用预安装的 PHP?

If it's too much of a hassle, is there any way to allow VSC to use that pre-installed PHP?如果太麻烦,有什么办法可以让 VSC 使用预装的 PHP? I've changed File>Preferences>Extensions>PHP>PHP›'Validate: Executable Path' to:我已将 File>Preferences>Extensions>PHP>PHP›'Validate: Executable Path' 更改为:

"php.validate.executablePath": "C:\xampp\php\php.exe" “php.validate.executablePath”:“C:\xampp\php\php.exe”

but it's still not working.但它仍然无法正常工作。 I've tried to set php.executablePath, but it's greyed out.我尝试设置 php.executablePath,但它是灰色的。

If you want PHP executables to available for all your users you need to set the PATH in SYSTEM VARIABLES.如果您希望 PHP 可执行文件可供所有用户使用,您需要在 SYSTEM VARIABLES 中设置 PATH。

Please check by going to the system properties screen (Win+Pause/Break) and then Select Advanced System Settings -> Advanced请转到系统属性屏幕(Win+Pause/Break)然后检查 Select Advanced System Settings -> Advanced

And add your path C:\Xampp\php\ to the path list as shown in this picture.并将您的路径C:\Xampp\php\添加到路径列表中,如图所示。

Windows 上的路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM