打开PHP配置文件php.ini,找到;extension=php_mssql.dll把前面的分号去掉,2、找到mssql.secure_connection = Off修改成 mssql.secure_connection = On,3、把PHP文件夹下的php_mssql.dll和ntwdblib.DLL这两个文件拷贝到C:windowssystem32文件夹下
在这里,复制ntwdblib.dll到c:windowssystem32下是失败,原因是该目录下已经存在该dll文件啦.重启apache.
$hostname="10.4.250.20"; $dbuser="hr"; $dbpasswd="946138"; $dbname="hr"; $conn = mssql_connect($hostname,$dbuser,$dbpasswd) or die("数据库连接错误!"); mssql_select_db($dbname,$conn); $sql = " select * from pip_staff_s where cstaffid ='z797' "; $rowset=mssql_query($sql,$conn); $rowcnt=mssql_num_row($rowset); echo " rows "; echo $rowset; echo " end ";

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Linux new version
SublimeText3 Linux latest version

Notepad++7.3.1
Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.
