在命令行中禁用php命令

时间:2015-03-07 13:32:56

标签: php command-line environment-variables

这是命令日志“php -v”和“php.exe -v”:

C:\Users\Azerty>php -v
PHP 5.5.9 (cgi-fcgi) (built: Feb 16 2014 21:44:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

C:\Users\Azerty>php.exe -v
PHP 5.5.9 (cli) (built: Feb 16 2014 21:44:50)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

如果我在Path系统环境变量中删除了php文件的路径,则日志为:

C:\Users\Azerty>php -v
PHP 5.5.9 (cgi-fcgi) (built: Feb 16 2014 21:44:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

C:\Users\Azerty>php.exe -v
"php.exe" is not recognized as an internal or external 
command, operable program or batch file.

一切都正确,但“php -v”命令如何工作? Path变量中没有到php文件的路径。 如何禁用“php”命令?除路径变量外,哪里可以写?操作系统是Win7

0 个答案:

没有答案