Connect php 5.3 To The sqlserver Database

Source: Internet
Author: User

1. The original mssql. dll of php is no longer available after 5.3. Therefore, to connect to the mssql database, you need to go to the Microsoft official website to find the address such as sqlsrv. dll as follows:

 

And other files

  <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + signature + sb3yc + signature/HU8rK7xNzV/Signature + CjxwPs/Signature + signature/Signature + CjxwPtauuvO + zb/Signature/b7dv + LByzwvcD4KPHA + yr7A/bT6wuvI58/Co7o8L3A + CjxwPiZuYnNwOzwvcD4KPHByZSBjbGFzcz0 = "brush: java; "> Sa, PWD => erinERIN, Database => tphp); $ conn = sqlsrv_connect ($ strServer, $ connInfo); var_dump ($ conn); if ($ conn) {echo success !; $ Query = sqlsrv_query ($ conn, 'select * from puser'); if ($ query = false) {sqlsrv_close ($ conn); die ('empty ');} while ($ row = sqlsrv_fetch_array ($ query, SQLSRV_FETCH_ASSOC) {var_dump ($ row);} sqlsrv_close ($ conn);} else {echo fail !; Die (print_r (sqlsrv_errors (), true) ;}?>

 

 

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.