当我使用 php
C:xampphtdocs>php
'php' is not recognized as an internal or external command,
operable program or batch file.
在以下路径中使用 php 运行命令时没有出现任何错误:
I don't get any error when I run the command with php in following path:
C:xamppphp>php //do not got error here
为什么会出现这个错误?
Why I get this error?
'php' 不是内部或外部命令,也不是可运行的程序或批处理文件.
'php' is not recognized as an internal or external command, operable program or batch file.
将 C:xamppphp 添加到您的 PATH 环境变量中.(My Computer->属性->高级系统设置->环境变量->编辑路径)
Add C:xamppphp to your PATH environment variable.(My Computer->properties -> Advanced system setting-> Environment Variables->edit path)
然后关闭命令提示符并重新启动.
Then close your command prompt and restart again.
注意:关闭命令提示符并重新启动非常重要,否则将不会反映更改.
Note: It's very important to close your command prompt and restart again otherwise changes will not be reflected.
这篇关于PHP 在命令提示符中未被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
PHP、MySQL PDOException 的死锁异常代码?Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死锁异常代码?)
PHP PDO MySQL 可滚动游标不起作用PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滚动游标不起作用)
PHP PDO ODBC 连接PHP PDO ODBC connection(PHP PDO ODBC 连接)
使用 PDO::FETCH_CLASS 和魔术方法Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔术方法)
php pdo 只从 mysql 获取一个值;等于变量的值php pdo get only one value from mysql; value that equals to variable(php pdo 只从 mysql 获取一个值;等于变量的值)
MSSQL PDO 找不到驱动程序MSSQL PDO could not find driver(MSSQL PDO 找不到驱动程序)