forget about this.
| From: | julian | Date: | Tue, 04 Dec 2007 12:23:50 +0000 |
| Subject: | forget about this. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265449@lists.php.net to get a copy of this message | ||
julian wrote:
however this will work... p1.inc 1 <?php 2 3 class dbb{ 4 5 var $var=10; 67 function fun2(){ 8 return $this->var;; 9 }10 } 11 12 class obj {13 var $obj2=20;1415 function f1(){ 16 global $db;1718 echo "\n".$db->fun2()*$this->obj2."\n"; 19 }20 } 21 ?> 1 #!/usr/bin/php -q 2 3 <?php 4 5 require_once('p1.inc'); 6 7 $db= new dbb(); 8 9 10 $obj = new obj(); 11 12 $obj->f1(); 13 14 ?>