时间:2021-07-01 10:21:17 帮助过:7人阅读
常用连接函数mysql_connect()
mysql_connect(servername,username,password);
长连接函数mysql_pconnect()
mysql_pconnect(servername,username,password);
代码如下 | |
$con = mysql_connect("localhost","peter","abc123"); |
说的是mysql_pconnect,怎么能绕开MySQL的设置。影响mysql_pconnect最重要的两个参数就是wait_timeout和interactive_timeout
代码如下 | |
$conn = mysql_pconnect("localhost","root","123456") or die("Can not connect to MySQL"); |
http://www.bkjia.com/PHPjc/630705.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/630705.htmlTechArticle在php中连接数据有mysql_connect() 函数或mysql_pconnect()函数来完成,下面我给大家php入门者简单介绍介绍。 常用连接函数mysql_connect() mysql_connec...