1.php环境
~]# vim /var/www/html/index.php(默认)
<?php phpinfo(); ?>
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(); ?>
时间: 2024-10-11 01:40:53