PHP的serverl sql驱动安装好:
数据库管理软件界面:
登录的PHP程序:
程序执行现象:

解决方案 »

  1.   

    PHP环境用的Wampserver
      

  2.   

    不会php,但是不是没有指定instance name啊?
    一般connection string不是要 servername\instancename 吗?e.g. localhost\SQLExpress
      

  3.   

    看文档这个方法是用Windows 验证。意味着本地机器上要有这个账户 Ctrl +R -> Enter cmd in RUN -> type 'net user'. This lists you all Windows account on your PC.In the command prompt, you can enter 'whoami'. This will list your current windows account.
    你程序里是用sa。  sa是SQL的默认管理员用户名。 用的是SQL验证。 所以就不工作啦