`
天梯梦
  • 浏览: 13629587 次
  • 性别: Icon_minigender_2
  • 来自: 洛杉矶
社区版块
存档分类
最新评论

linux: 命令行运行php Run PHP from the command line

 
阅读更多

As an alternative to /opt/lampp/bin/php, to run a php script from the command line, you just need to install php5-cli:

sudo apt-get install php5-cli

 

And run your script with:

php myscript.php

 

To open an interactive php shell, just type in a terminal:

如果想在terminal里面直接写php,可以用:

php -a

 

转自:linux: 命令行运行php Run PHP from the command line

 

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics