|
 |
|
ขอความช่วยเหลือหน่อยครับเกี่ยวกับ Connect MSSQL บน Win7 |
|
 |
|
|
 |
 |
|
my หรือ ms ครับ
|
 |
 |
 |
 |
Date :
2009-09-02 16:52:35 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Fatal error: Call to undefined function mssql_pconnect()
มัน Error อย่างนี้ครับ
ใช้ครับผมต้องการติดต่อฐานข้อมูล Microsoft SQL Server 2000 ซึ่งจำเป็นต้องใช้งาน Extension ของ PHP_MSSQL.DLL และผมเองก็ได้ทำการเปิดใช้งานแล้ว และทำการRestart Apache แล้วครับแต่ยังไม่ได้เลย
|
 |
 |
 |
 |
Date :
2009-09-02 17:00:03 |
By :
suneogaz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Connect Server ได้มั้ยครับ??
Code (PHP)
<?php
$servername = ""; //กำหนดชื่อ server
$databasename = ""; //กำหนดชื่อ database
$user = ""; //กำหนดชื่อ user name ที่จะ connect database
$pass = ""; //กำหนด password ที่จะ connect ไปที่ database
$connection_string = "DRIVER={SQL Server};SERVER=$servername;DATABASE=$databasename;AutoTranslate=no"; //เป็นการกำหนด connection string ในการ connect ODBC
$cid = odbc_connect($connection_string,$user, $pass);
if ( !$cid )
{
echo "ไม่สามารถติดต่อกับระบบได้ ";
exit();
}
else
{
//แจ้งข้อความบอกเมื่อติดต่อกับระบบได้
echo "สามารถติดต่อกับระบบได้ ";
}
?>
|
 |
 |
 |
 |
Date :
2009-09-02 17:26:50 |
By :
panyapol |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
|
 |
 |
 |
 |
Date :
2009-09-02 17:53:36 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|