PHP 测试 MySQL 连通性
测试 MySQL 连通性:
<?php $link = mysql_connect("localhost","root","password"); if(!$link){ echo "抱歉,连接错误。"; } else { echo "OK,连接成功。"; } ?>
测试 MySQL 连通性:
<?php $link = mysql_connect("localhost","root","password"); if(!$link){ echo "抱歉,连接错误。"; } else { echo "OK,连接成功。"; } ?>