php连接mysql数据库
<?php $con = mysql_connect("localhost", "root", "123456"); if(!$con) { die('Could not connect: ' . mysql_error()); } else echo "Open mysql db success<br/>"; mysql_close($con); ?>
<?php $con = mysql_connect("localhost", "root", "123456"); if(!$con) { die('Could not connect: ' . mysql_error()); } else echo "Open mysql db success<br/>"; mysql_close($con); ?>