-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.php
52 lines (37 loc) · 824 Bytes
/
db.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
class DB{
public $host ="127.0.0.1";
private $user = "root";
private $password = "";
private $database = "dbfunfood";
public function __construct()
{
echo 'function construct';
}
public function selectData()
{
echo 'select data';
}
public function getDatabase()
{
echo $this->database;
}
public function tampil()
{
$this->selectData();
}
public static function insertData()
{
echo "static function";
}
}
DB::insertData();
//$db = new DB;
// $db->selectData();
// $db->host;
// echo $db->host;
// echo '<br>';
// $db->getDatabase();
// $db->tampil();
//var_dump($db);
?>