How to execute PHP script under linux

How to execute PHP script under linux

When executing php scripts under Linux , you can usually use the following commands:

1

#/usr/local/php/bin/php test.php

In order to simplify the input, this php executable program can be  copied to the system command directory:

1

#cp /usr/local/php/bin/php /usr/sbin/

Verification: Enter the following command. If the php version is obtained correctly, the operation is successful.

1

#php -v

In this way, the following input methods can be used directly when executing the PHP script in the future.

1

#php a.php

 


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325389300&siteId=291194637