Mysql:
<?php
header('Content-Type:text/html;charset=utf-8');
$link = mysql_connect('localhost:3306','root','123456');
$db_selected = mysql_select_db('itcast','$link');
if($db_selected){
echo '数据库选择成功';
}
?>
本文共 303 字,大约阅读时间需要 1 分钟。
Mysql:
<?php
header('Content-Type:text/html;charset=utf-8');
$link = mysql_connect('localhost:3306','root','123456');
$db_selected = mysql_select_db('itcast','$link');
if($db_selected){
echo '数据库选择成功';
}
?>
转载于:https://www.cnblogs.com/httpssl/p/11000143.html