Hello All,
I want to Access Registry from PHP script. I had sreach on net and I got Class for this which is as below.
[code=php]
<?php
class Registry {
private $vars = array();
function set($key, $var) {
if (isset($this->vars[$key]) == true) {
throw new Exception('Unab le to set var `' . $key . '`. Already set.');
}
$this->vars[$key] = $var;
return true;
}
function get($key) {
if (isset($this->vars[$key]) == false) {
return null;
}
return $this->vars[$key];
}
function remove($var) {
unset($this->vars[$key]);
}
/*}*/
}
$registry = new Registry;
//Set some data
//$registry->set ('name', 'Priti Shah');
//Get data, using get()
echo $registry->get ('name');
//Get data, using array access
echo $registry['name'];
?>[/code]
But this will just set KEY to Array and read it from Array. I want to read KEY from regedit.
Please help me out soooon .........
Regards,
I want to Access Registry from PHP script. I had sreach on net and I got Class for this which is as below.
[code=php]
<?php
class Registry {
private $vars = array();
function set($key, $var) {
if (isset($this->vars[$key]) == true) {
throw new Exception('Unab le to set var `' . $key . '`. Already set.');
}
$this->vars[$key] = $var;
return true;
}
function get($key) {
if (isset($this->vars[$key]) == false) {
return null;
}
return $this->vars[$key];
}
function remove($var) {
unset($this->vars[$key]);
}
/*}*/
}
$registry = new Registry;
//Set some data
//$registry->set ('name', 'Priti Shah');
//Get data, using get()
echo $registry->get ('name');
//Get data, using array access
echo $registry['name'];
?>[/code]
But this will just set KEY to Array and read it from Array. I want to read KEY from regedit.
Please help me out soooon .........
Regards,
Comment