mssql_connect

(PHP 4, PHP 5, PECL odbtp >= 1.1.1)

mssql_connect锟斤拷MS SQL server锟斤拷锟斤拷

说锟斤拷

mssql_connect ([ string $servername [, string $username [, string $password [, bool $new_link = false ]]]] ) : resource

mssql_connect() 锟斤拷锟斤拷一锟斤拷MS SQL server锟斤拷锟接★拷

锟斤拷锟接伙拷锟节筹拷锟斤拷执锟叫斤拷锟斤拷之锟斤拷乇锟�, 锟斤拷锟斤拷锟斤拷之前锟窖撅拷通锟斤拷锟斤拷锟斤拷mssql_close()锟截闭★拷

锟斤拷锟斤拷

servername

锟斤拷锟斤拷锟斤拷,锟斤拷锟斤拷锟皆帮拷锟斤拷一锟斤拷锟剿口猴拷 e.g. 锟斤拷锟斤拷:锟剿口猴拷(hostname:port) (Linux), 锟斤拷 锟斤拷锟斤拷,锟剿口猴拷(hostname,port) (Windows).

username

锟矫伙拷锟斤拷锟斤拷

password

锟斤拷锟诫。

new_link

锟斤拷锟斤拷诙锟斤拷蔚锟斤拷锟�mssql_connect()使锟斤拷锟斤拷同锟侥诧拷锟斤拷锟斤拷 锟斤拷锟结建锟斤拷锟铰碉拷锟斤拷锟接o拷锟斤拷锟角斤拷之前锟窖撅拷锟津开碉拷锟斤拷锟接憋拷识锟斤拷锟截★拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街碉拷锟斤拷锟斤拷薷模锟斤拷锟绞癸拷玫锟斤拷锟� mssql_connect()锟斤拷锟角会建锟斤拷锟铰碉拷锟斤拷锟接o拷 锟斤拷锟斤拷锟斤拷锟�mssql_connect()使锟斤拷锟斤拷之前同锟斤拷锟侥诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷为锟缴癸拷, 锟斤拷锟斤拷 FALSE 锟酵达拷锟斤拷锟斤拷息.

锟斤拷锟斤拷锟斤拷志

锟芥本 说锟斤拷
5.1.0 new_link锟斤拷锟斤拷锟斤拷锟斤拷

锟斤拷锟斤拷

Example #1 mssql_connect() 锟斤拷锟斤拷

<?php
// Server in the this format: <computer>\<instance name> or 
// <server>,<port> when using a non default port number
$server 'KALLESPC\SQLEXPRESS';

// Connect to MSSQL
$link mssql_connect($server'sa''phpfi');

if (!
$link) {
    die(
'Something went wrong while connecting to MSSQL');
}
?>

锟轿硷拷