php:php以脚本的方式运行
一、php源码
1 [[email protected] php]# 2 [[email protected] 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 [[email protected] php]# 5 [[email protected] php]# pwd 6 /root/user/lidawei/program/php 7 [[email protected] php]# 8 [[email protected] php]# ls 9 test.php 10 [[email protected] php]# 11 [[email protected] 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 [[email protected] php]# 14 [[email protected] 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 [[email protected] php]# 26 [[email protected] php]# ./test.php 27 28 29 PHP: hello, world! 30 [[email protected] php]# 31 [[email protected] php]# 32 [[email protected] php]# 33 [[email protected] php]#
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/php/280936.html