命令行在本地使用wamp [英] command line locally using wamp

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

问题描述

在此处引用此帖子时

http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/

它告诉您使用XAMPP从外壳运行php -q path\to\server.php,WAMP是否有替代方案?

it tells you to run php -q path\to\server.php from shell using XAMPP, is there an alternative for WAMP?

推荐答案

将php.exe注册为环境变量可能很有用,这样命令行可以识别'php'命令,而无需输入完整路径'\wamp\ \bin\php\php5.3.8\php'作为命令。

It might be useful to register php.exe as an ENVIRONMENT VARIABLE so the command line can recognize the 'php' command instead of needing to enter the full path '\wamp\bin\php\php5.3.8\php' as the command.

为此,您可以按照本页上概述的步骤操作: http://windows.fyicenter.com/view.php?ID=60 。除了第5步外,请输入WAMP的php.exe路径。例如,只需将 $; C:\wamp\bin\php\php5.3.8 添加到变量值字段中。而且每次打开命令行时,只需使用

To do this, you can follow the steps outlined on this page: http://windows.fyicenter.com/view.php?ID=60. Except for Step 5, enter the path of WAMP's php.exe instead. For example, just add in $;C:\wamp\bin\php\php5.3.8 to the Variable value field. And each time you open up your command line, just run php using

php pageYouAreRunning.php 

..仍然牢记pageYouAreRunning.php相对于命令行中的当前路径。

..still keeping in mind that the pageYouAreRunning.php is relative to the current path in your command line.

这篇关于命令行在本地使用wamp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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