1
安装PHP 7。在php中有一个测试脚本。尝试从命令行启动。如何从命令行运行PHP 7 ...?
[[email protected]/php]# vim db_connect.php
[[email protected]/php]# php db_connect.php
The program 'php' is currently not installed. You can install it by typing: apt-get install php5-cli
[[email protected]/php]# php7 db_connect.php
No command 'php7' found, did you mean:
[[email protected]/php]# php-7 db_connect.php
php-7: command not found
[[email protected]/php]# php -v
The program 'php' is currently not installed. You can install it by typing:
apt-get install php5-cli
[[email protected]/php]# apt-get install php7-cli
E: Unable to locate package php7-cli
使用php7启动的命令是什么?
'apt-get install php5-cli'肯定不会安装php7。 –
请参阅:[如何安装PHP 7?在askubuntu.com上](http://askubuntu.com/questions/705880/how-to-install-php-7) –
一旦启动并运行,我建议使用PDO命令而不是db_connect。它有安全问题,你可以在这个术语下找到关于这个网站的信息。 – Sparky256