Home >Backend Development >PHP Tutorial > 小弟我的phpmyadmin工作正常,但是为何小弟我用 mysql_connent()却提示出错

小弟我的phpmyadmin工作正常,但是为何小弟我用 mysql_connent()却提示出错

WBOY
WBOYOriginal
2016-06-13 13:01:53937browse

我的phpmyadmin工作正常,但是为何我用 mysql_connent()却提示出错?
我配置了php和mysql,从phpmyadmin里面可以正常访问并修改数据库,但是不知为何,从我自己写的函数中访问,总会提示“未定义的函数”







<?php<br />
<br />
$host = "localhost";<br />
<br />
$username = "root";<br />
<br />
$passowrd="123456";<br />
<br />
$dbname="test";<br />
<br />
$res = mysql_connent($host,$username,$password) or die(mysql_error());<br />
<br />
@mysql_select_db($dbname);<br />
<br />
?><br />
<br />


请问这如何解决啊?
------最佳解决方案--------------------
mysql_connent -> mysql_connect  

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