<?php
header("Content-type:text/html; default_charset=UTF-8");
require_once('../wx/config.php');
$lnk = mysql_connect($mysql_server_name, $mysql_username, $mysql_password)
or die ('Not connected : ' . mysql_error());
// make foo the current db
mysql_select_db($mysql_database,$lnk) or die ('Can\'t use foo : ' . mysql_error());
mysql_close($lnk);
?>
<?php
header("Content-type:text/html; charset=UTF-8");
$mysql_server_name='localhost:3306';
$mysql_username='root';
$mysql_password='123456';
$mysql_database='content';
?>
是不是用xampp连接php和mysql还要打开什么吗?