Home > Backend Development > PHP Tutorial > 这个php连接数据库代码哪里错了啊!

这个php连接数据库代码哪里错了啊!

WBOY
Release: 2016-06-23 14:11:28
Original
876 people have browsed it

$find=mysql_connect(da7297f80aa7a35ad8418898e99a6156,121f559f1e06b2889190f0bc8af7e69d,387d0ee9a945d20e70d1c0bcababfbb5);
if(!$find){
  echo"数据库连接失败";
}else{
  echo"数据库连接成功";
}
$data=mysql_select_db(0e55dc7af851d87009b142fcd44757f3,$find);
mysql_query("SET NAME 'UTF8'");
?>
我想用MD5加密代替数据库信息!但,浏览器什么也没输出!到底哪里错了啊?求详细解决方法


回复讨论(解决方案)

你是高人!自愧不如
这样写
$find=mysql_connect(da7297f80aa7a35ad8418898e99a6156,121f559f1e06b2889190f0bc8af7e69d,387d0ee9a945d20e70d1c0bcababfbb5);
不会报错吗?

真的什么也没有输出输出吗?


$data=mysql_select_db(0e55dc7af851d87009b142fcd44757f3,$find);

你的数据库名称为:0e55dc7af851d87009b142fcd44757f3 ???

加密用户密码就行了,

不至于连连接数据库的用户名密码也md5吧

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