php丽娜姐到mysql数据库并进行简单的查询过程演示
<?php $DB_HOST = "localhost"; $DB_NAME = "db"; $DB_USER = "user"; $DB_PASSWORD = "pass"; $con = mysql_connect($DB_HOST, $DB_USER, $DB_PASSWORD); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($DB_NAME , $con); mysql_close($con); ?>