Php connection to mssql database and configuration method _ PHP Tutorial

Source: Internet
Author: User
Php connection to the mssql database and configuration method. The following section describes how to connect php to the mssql database and how to configure phpmssql, in this case, if you are a beginner, this article will allow you to configure php to connect to the mssql database and the configuration method. below, I will tell you how to connect php to the mssql database and configure it with php mssql, in this way, if you are a beginner, this article will allow you to configure mssql and connect php to the mssql database.

Php connection mssql database tutorial and configuration method
The following is a tutorial on connecting php to the mssql database and configuring mssql with php. if you are a beginner, you can configure mssql to connect php to the mssql database.
*/
// Link to the database

$ Localhost = '127. 0.0.1 '; // mssql database ip address
$ Sa = 'sa '; // mssql logon username
$ Pwd = '000000'; // connection password
$ Db = 'CS '; // Database
$ Conn = mssql_connect ($ localhost, $ sa, $ pwd) or die ('mssql database connection failed ');
Mssql_select_db ($ db, $ conn); // The selected database is the same as the mysql tutorial.
// Query statement
$ Query = "select * from vc ";
$ Adminresult = mssql_query ($ query) or die ('SQL'. $ query );
// Output result

While ($ rs = mssql_fetch_array ($ adminresult ))
{
Echo $ rs ['0'];
}

/*
Notes

1. open php. in and remove the annotation symbol of extension = php_mssql.dll.

2. open php. in and change mssql. secure_connection = off to on.

3. copy php_mssql.dll to the directory specified by extension_dir in php. in or the system32 directory of the system. (Php_mssql.dll is included in the php compression installation package ).

After completing the preceding steps, restart apache.

Note: in actual use, if php is manually installed under iis through the php compressed file, the machine must be restarted, not just iis.

4. ensure that ntwdblib. dll is available in php or system32. check the attributes to make sure that the version is 8.00.194 instead of 7.0.

Http://www.bkjia.com/PHPjc/630825.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/630825.htmlTechArticlephp connection mssql database and configuration method below to tell all friends php connection mssql database and php mssql configuration method Oh, so if you are a beginner this article can let you from the configuration...

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.