Window PHP 使用命令行模式

电脑系统: win7 

php环境: phpstudy

1 把php目录放到环境变量path下面:

  我的电脑-》属性-》高级-》环境变量-》系统变量->Path->编辑->
  查看路径下有没有php目录,如果没有加上
  比如我的php路径是D:phpStudyphpphp-5.6.27-nts
  所以要在最后面加上D:phpStudyphpphp-5.6.27-ntsext;
  
 
 
一路点确定,配置完成!
 
 

2  cmd  进入 php目录:D:phpStudyphpphp-5.6.27-nts

   运行PHP 文件:  php   D:phpStudyWWW11.php

原文地址:https://www.cnblogs.com/richerdyoung/p/6674346.html