https://static.06ms.com/static/images/index/2.jpg

Access数库转MySQL数据库源码

<?php  
//一、连接mysql
$dbhost = "localhost:3307"; //服务器
$db = "dataname"; //数据库
$dbuser = "root"; //用户名
$dbpass = "*******"; //密码
$db_qianzhui = "sdb_"; //表前缀
$link = mysql_connect($dbhost,$dbuser,$dbpass);
if(!$link) echo "链接失败!";
else echo "成功!!!";
mysql_query("SET NAMES 'UTF8'");
mysql_query("SET CHARACTER SET UTF8"); //解决乱码问题
mysql_query("SET CHARACTER_SET_RESULTS=UTF8'");
mysql_select_db("{$db}");
?>