PHPでHello World

(20)

apt install php7.4-cli
php -v


vim hello.php

<?php
echo "Hello World!";
?>

php hello.php

--
vim web.php

<?php
echo "Hello World!!";
?>

php -S 192.168.137.167:8080 web.php

(10)

apt install php7.3-cli
php -v


vim hello.php

<?php
echo "Hello World!";
?>

php hello.php

--
vim web.php

<?php
echo "Hello World!!";
?>

php -S 192.168.137.156:8080 web.php

 

(8)

dnf install php-cli
php -v


vim hello.php

<?php
echo "Hello World!";
?>

php hello.php

--
vim web.php

<?php
echo "Hello World!!";
?>

php -S 192.168.137.165:8080 web.php

 

(2019)
https://windows.php.net/download#php-7.2
php-7.2.33-1-Win32-VC15-x64.zip

cd C:\Users\Administrator\Downloads\php-7.2.33-1-Win32-VC15-x64

php -v


notepad hello.php

<?php
echo "Hello World!";
?>

php hello.php

--
notepad web.php

<?php
echo "Hello World!!";
?>

php -S 192.168.137.61:8080 web.php