How to connect PHP to the SqlServer database I just started to contact PHP to connect to the database .. Almost all the tutorials are MySql. how can I connect to the SQL & nbsp; Server database. I have configured all the configuration methods found on the Internet. But there is no ntwdblib. dll file under my installation directory. The code is as follows: & PHP how to connect to the SQL Server database
I was just getting started with PHP and connected to the database .. Almost all the tutorials are MySql. how can I connect to the SQL Server database. I have configured all the configuration methods found on the Internet. But there is no ntwdblib. dll file under my installation directory.
The code is as follows:
$ Conn = @ mssql_connect ("localhost", "zhengjie", "123") or die ("connection error! ");
Mssql_select_db ("student information management ");
If ($ conn)
{
Echo "connection successful! ";
}
?>
No prompts after running ...... Please help ...... Thank you for sharing:
------ Solution --------------------
You use
Mysql_error ()
Check the error message.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service