从命令行PHP为空 [英] php from command line empty

查看:82
本文介绍了从命令行PHP为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经更新了Windows,现在,当我使用命令行并键入PHP时,什么也没有返回。尝试了各种PHP命令,什么都没有,甚至没有错误或响应。

I have updated windows today and now when I use the command line and type PHP nothing returns. tried various PHP commands, nothing, not even an error or response. blank.

我在环境变量中的路径正确。试图更改为另一个PHP版本,甚至尝试从环境变量中删除路径,但仍然返回空!
即使删除了环境变量,它甚至都没有说 PHP未被识别!

I had the correct path in the environment variables. Tried to change to another PHP version and even tried removing the path from environment variables but still returns empty! It doesn't even say that "PHP" is not recognized although I removed the environment variable!!

我不知道如何解决这个问题。 / p>

I have no clue how to solve this.

推荐答案

如果从命令行调用它时没有传递额外的参数,那应该是这样。

If you are not passing extra parameters when you call it from command line, that´s how it supposed to work.

尝试运行:

php --help (to see all options from command line)

另外,要确保它正在运行,请尝试执行以下操作:

Also, to make sure it is running try to do this:

php -v (to check version)
php -F filename.php

最后一个应该运行您的php文件。

The last one should run your php file.

这篇关于从命令行PHP为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆