Home > Backend Development > PHP Tutorial > 【随笔】php连接mysql步骤

【随笔】php连接mysql步骤

WBOY
Release: 2016-06-20 12:32:55
Original
721 people have browsed it

<?php     $link=mysql_connect("localhost","root","*******")            //mysql_connect("端口地址","用户名","密码")    mysql_query("set names utf8");                                //设置字符集    mysql_query("use XXXX_文件");                                //要使用的数据库                                    ?>
Copy after login


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template