电脑系统: win7
php环境: phpstudy
1 把php目录放到环境变量path下面:
我的电脑-》属性-》高级-》环境变量-》系统变量->Path->编辑->
查看路径下有没有php目录,如果没有加上
比如我的php路径是D:phpStudyphpphp-5.6.27-nts
所以要在最后面加上D:phpStudyphpphp-5.6.27-ntsext;
![](https://images2015.cnblogs.com/blog/1103071/201704/1103071-20170406165115863-1856725069.png)
![](https://images2015.cnblogs.com/blog/1103071/201704/1103071-20170406165123472-424141101.png)
![](https://images2015.cnblogs.com/blog/1103071/201704/1103071-20170406165145316-286912370.png)
一路点确定,配置完成!
2 cmd 进入 php目录:D:phpStudyphpphp-5.6.27-nts
运行PHP 文件: php D:phpStudyWWW11.php