Mysql 连接选择数据库

原文链接: http://www.cnblogs.com/httpssl/p/11000143.html

Mysql:

   

      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

你可能感兴趣的:(Mysql 连接选择数据库)