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

【随笔】php连接mysql步骤

WBOY
WBOYOriginal
2016-06-20 12:32:55725browse

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


Statement:
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