您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

关于 php 配置有关问题

2024/4/1 2:31:57发布13次查看
关于 php 配置问题
环境: win7 iis7.5 php5.3.10 mssql 2008
要用php 连接sql下的微软的sqlsrv。 装好可以hello world
使用测试微软的测试用例:
php code $value) { echo $key.: .$value.\n; }}else{ echo client info error.\n;}/* close connection resources. */sqlsrv_close( $conn);?>
结果出现这个:
could not connect. array ( [0] => array ( [0] => 08001 [sqlstate] => 08001 [1] => 53 [code] => 53 [2] => [microsoft][sql server native client 10.0]named pipes provider: could not open a connection to sql server [53]. [message] => [microsoft][sql server native client 10.0]named pipes provider: could not open a connection to sql server [53]. ) [1] => array ( [0] => hyt00 [sqlstate] => hyt00 [1] => 0 [code] => 0 [2] => [microsoft][sql server native client 10.0]login timeout expired [message] => [microsoft][sql server native client 10.0]login timeout expired ) [2] => array ( [0] => 08001 [sqlstate] => 08001 [1] => 53 [code] => 53 [2] => [microsoft][sql server native client 10.0]a network-related or instance-specific error has occurred while establishing a connection to sql server. server is not found or not accessible. check if instance name is correct and if sql server is configured to allow remote connections. for more information see sql server books online. [message] => [microsoft][sql server native client 10.0]a network-related or instance-specific error has occurred while establishing a connection to sql server. server is not found or not accessible. check if instance name is correct and if sql server is configured to allow remote connections. for more information see sql server books online. ) )
这他娘是怎么一会事。我搞了两天了。要疯掉了。 谁能救命
------解决方案--------------------
$servername = 'local';
$conn = sqlsrv_connect( $servername);
????
连接数据库连用户名都不要吗?什么时候这样大方了?
local 表示当前服务i中唯一的实例,家那么多引号干什么
------解决方案--------------------
如需要阅读该回复,请登录或注册csdn!
------解决方案--------------------
如需要阅读该回复,请登录或注册csdn!
------解决方案--------------------
如需要阅读该回复,请登录或注册csdn!
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product