简体   繁体   English

使用php-fpm时如何从终端运行php -v

[英]how to run php -v from terminal when using php-fpm

I have Nginx installed with PHP-FPM and I cant figure out how to run php -v into terminal it says that i need to install php5-cli. 我已经用PHP-FPM安装了Nginx,但我想不出如何在终端中运行php -v,它说我需要安装php5-cli。 How else can I run php from terminal? 我还能从终端运行php吗? I am using ubuntu. 我正在使用ubuntu。 I just need php from terminal to run a cron 我只需要从终端运行php的cron

You need to find out if the PHP installation folder is in your PATH. 您需要确定PHP安装文件夹是否在PATH中。 You can check by doing "echo $PATH". 您可以通过执行“ echo $ PATH”进行检查。 if you don't find the PHP install folder there then that's probably the problem 如果您没有找到PHP安装文件夹,则可能是问题所在

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM