"fff","ConnectionPooling"=>'','UID '=>'사','PWD ..."/> "fff","ConnectionPooling"=>'','UID '=>'사','PWD ...">
php의 sqlsrv 모듈 설치
//로컬 연결
$serverName = "CX95DLISVW4C6TKaaa";//컴퓨터 이름 인스턴스 이름
$connectionInfo = array("Database"=>"fff", "ConnectionPooling"=>'','UID'=>'sa','PWD'=>'123')
$conn = sqlsrv_connect( $serverName, $connectionInfo)
if( $conn == false)
{
echo "연결 실패!";
die( print_r( sqlsrv_errors(), true))
}else{
echo "dfdf"; 🎜>$query=sqlsrv_query($conn,"dbo.fdsf에서 * 선택");
while($row = sqlsrv_fetch_array($query)){
print_r($row) }
//print_r($query);
}
//원격 연결
$serverName = "192.168.1.5"
$connectionInfo = array("Database"=>" CIA","ConnectionPooling"=>'','UID'=>'sa','PWD'=>'360kad.com');
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn == false)
{
echo "연결 실패!";
die( print_r( sqlsrv_errors(), true))
}else{
echo "dfdf";
$query=sqlsrv_query($conn,"CodeSiteTaker_Model에서 * 선택")
while($row = sqlsrv_fetch_array($query)){
print_r($row); }
//print_r($query)
}