php 连接mysql

2016-09-27 分类: PHP 阅读(4214)
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

// some code

?>