however this will work...
p1.inc
1 var;;
9}
10 }
11
12 class obj {
13var $obj2=20;
14
15function f1(){
16 global $db;
17
18 echo "\n".$db->fun2()*$this->obj2."\n";
19}
20 }
21 ?>
1 #!/usr/bin/php -q
2
3 f1();
13
14 ?>
--
PHP General Mailing L
julian wrote:
I want to open a database connection at program initialization and use
that very same connection via globals initilizating ( loading from db)
other objects.
Basically
index.php
$db=new mysqli(host,us,pass,db);
if(mysqli_connect_errno()){
die('errordb conex');
}
switch
2 matches
Mail list logo