note 54584 deleted from language.variables.scope by betz
| From: | betz@php.net | Date: | Fri, 08 Jul 2005 15:00:02 +0000 |
| Subject: | note 54584 deleted from language.variables.scope by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91676@lists.php.net to get a copy of this message | ||
Note Submitter:
----
$include_path = dirname(__FILE__);
include_once $include_path."/admin/config.inc.php";
//here i create variables used later
include_once $include_path."/lib/mysql.class.php";
FILE mysql.class.php
-----------------------------------
class gbook_sql {
var $conn_id;
var $result;
var $record;
var $db = array();
var $port;
function gbook_sql() {
global $GB_DB; <---------This return empty!!!!!!!!!
$this->db = $GB_DB;
if(ereg(":",$this->db['host'])) {
list($host,$port) = explode(":",$this->db['host']);
$this->port = $port;
} else {
$this->port = 3306;
}
}
How can these variebles created in other script included were accesibles in other script
included??.Any help please?. I am using PHP Version 5.0.4
Register globals is as it was by default: OFF.