Home  >  Article  >  Backend Development  >  php常用的conn写法――非常非常弱的有关问题

php常用的conn写法――非常非常弱的有关问题

WBOY
WBOYOriginal
2016-06-13 12:38:17903browse

php常用的conn写法――非常非常弱的问题
第一天接触php,看的w3教程。问题很弱、分很少,别见怪。

mysql下可能会有多个库(库01,库02,库03)
在写conn.php的时候,是不是应该写成下面这样?

<?php<br />
$conn=mysql_connect("mysql数据库的地址","用户名","密码")<br />
mysql_select_db("库01", $conn);<br />
?>


然后在所有文件中



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