الفصل
http://localhost/advancedphp/chapter03/customDB.php - Microsoft Internet Explorer
File Edit View Favorites
Back
Help
Search
Favorites Media
Address http://localhost/advancedphp/chapter03/customDB.php
Address Book
Add An Entry
Current Addresses:
Chris Cosentino
Home: 555-555-1234
Cell: 555-553-3456
Work: 555-555-6789
Tom Jones
Home: 444-444-0987
Cell: 444-444-7654
Work: 444-444-4321
1 Done
$page
"customDB.php";
1.
2.
3.
<?
Local intranet
customDB.php
紅龍
74
الشكل 2-3
البرنامج النصي customDB.php
4.
5.
6.
7.
8.
9.
10.
require_once("DBlib.php");
/* REQUIRED FOR DBlib.php */
//$db = "psql"; //PostgreSQL Database
//$db = "mysql"; //MySQL Database
$db = "mssql"; // MS SQL Database
$host = "192.168.0.1";
$database = "php";
11. $username = "mssqluser";
$password = "password";
12.
13.
*****/
14.
15.
16.
global $dbconn;
17.
function display_addresses ($db) {
selectDB ($db, $dbconn);
ص٧٤