index.php 引用连接数据库conn.php, index.php页头有一个乱码是怎么回事?
conn.php代码:<?php$hostname="127.0.0.1";//MsSQLServer$dbuser="sa";//用户名$dbpasswd="12345...
conn.php代码:
<?php
$hostname = "127.0.0.1"; //MsSQL Server
$dbuser = "sa"; //用户名
$dbpasswd = "123456"; //密码
$id = mssql_connect($hostname,$dbuser,$dbpasswd) ;
$db = mssql_select_db("shujuku",$id);
?>
--------------------------------------------------------------------------
index.php代码:
<?php
require("conn.php");
?>
---------------------------------------------------------------------------------
出现的乱码:
数据库是mssql GB2312编码 展开
<?php
$hostname = "127.0.0.1"; //MsSQL Server
$dbuser = "sa"; //用户名
$dbpasswd = "123456"; //密码
$id = mssql_connect($hostname,$dbuser,$dbpasswd) ;
$db = mssql_select_db("shujuku",$id);
?>
--------------------------------------------------------------------------
index.php代码:
<?php
require("conn.php");
?>
---------------------------------------------------------------------------------
出现的乱码:
数据库是mssql GB2312编码 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询