php:php以脚本的方式运行
一、php源码
1 [root@rockylinux php]# 2 [root@rockylinux php]# uname -a 3 Linux rockylinux 4.18.0-372.19.1.el8_6.x86_64 #1 SMP Tue Aug 2 16:19:42 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux 4 [root@rockylinux php]# 5 [root@rockylinux php]# pwd 6 /root/user/lidawei/program/php 7 [root@rockylinux php]# 8 [root@rockylinux php]# ls 9 test.php 10 [root@rockylinux php]# 11 [root@rockylinux php]# whereis php 12 php: /usr/bin/php /usr/lib64/php /etc/php.d /etc/php.ini /usr/share/php /usr/share/man/man1/php.1.gz 13 [root@rockylinux php]# 14 [root@rockylinux php]# cat test.php 15 #!/usr/bin/php 16 17 18 <?php 19 20 $var1="PHP: hello, world!"; 21 22 echo $var1 .PHP_EOL; 23 24 ?> 25 [root@rockylinux php]# 26 [root@rockylinux php]# ./test.php 27 28 29 PHP: hello, world! 30 [root@rockylinux php]# 31 [root@rockylinux php]# 32 [root@rockylinux php]# 33 [root@rockylinux php]#
标签:脚本,x86,64,usr,rockylinux,php,root,运行 From: https://www.cnblogs.com/lnlidawei/p/16592857.html