Yesterday and the day before yesterday, I took a dozen an hour to debug PHP and MySQL connections. I tried many ways, I thought it would be, I finally found it in the test program when I am going to collapse.
$ con =
MSSQL_CONNECT ("LocalHost: 3306", "root", "");
IF ($ con)
Echo "
success";
Else
Echo "Connection failed";
It turned out to be MSSQL, not
MySQL_CONNECT
I am crazy, PHP actually greeted my entry in this way, but I found that there were many people in 9CBS to make the same mistake, and some people simply contributed to the ASP, I wrote this problem to pay attention . PHP has many places and ASPs, which also gave me a vivid class.