简体   繁体   English

如何使用wamp服务器连接php和sql服务器2008 R2

[英]How connect php and sql server 2008 R2 using wamp server

Already changed file php.ini And the index.php file contains:已经更改文件 php.ini 并且 index.php 文件包含:

<?php
$server = 'name/SQLEXPRESS';
$link = mssql_connect($server, 'namepc', 'pw');
if (!$link) {
    die('Something went wrong');
}
?>

And the error message on the localhost is:本地主机上的错误消息是:

Warning: mssql_connect() [function.mssql-connect]:.警告:mssql_connect() [function.mssql-connect]:. (severity 14) (严重性 14)

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: Something went wrong警告:mssql_connect() [function.mssql-connect]:无法连接到服务器:出了点问题

Already made it.已经做到了。 Just create a new usser on managment studio and linked it the new accound to your php code.只需在 managment studio 上创建一个新用户并将其链接到您的 php 代码的新帐户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM