asp无法连接PHP的问题
代码:
connstr = "driver={mysql odbc 3.51 driver};database=nhga;server=localhost;uid=nhgazx;password=abcdefghijklmn_1234"
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = server.CreateObject("ADODB.Recordset")
Response.write("a")
conn.Open connstr
Response.write("b")
rs.open "select * from user where username = '" & username & "' and password = '" & password & "'",conn
If Not rs.eof Then
Response.write("yes")
Else
Response.write("no")
End If
调试页面输出a,没有输出b,这说明无法连接数据库,请问各位大虾是什么问题,如何解决?
另外,为什么ASP有时候会报错,有时候不报错(比如:未结束的字符串常量就报错,数据库连接失败就不报错),就像是IIS没有开启调试一样,编码很不方便。
说明:操作系统win7,iis7,mysql5.6.10.1。
谢谢各位大虾。