1.php环境

~]# vim /var/www/html/index.php(默认)
<?php
    phpinfo();
?>

wKiom1cYfYmDaeUXAADtqdYTqkE622.jpg


2.php和sql通信

~]# vim /var/www/html/index.php(默认)
<?php
    $link = mysql_connect('HOST','USERNAME','PASSWORD');
    if($link)
        echo "Success";
    else
        echo "Failure";
        
    mysql_close();
?>

wKiom1cYgQuiIX64AACK_yKskUs382.jpg

wKiom1cYgQvxFeZdAABNuGE4_e8979.jpg