Recent Posts
None | 25 sec ago
Prolog | 56 sec ago
PHP | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Python | 1 min ago
None | 1 min ago
None | 2 min ago
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Anonymous on the 9th of Feb 2010 08:06:42 PM
Download |
Raw |
Embed |
Report
<?php
/**
* QuDB by agrafix.net
*
*/
class QuDB {
private $fp = null;
public function __construct($filename = '_qudb.php') {
$f = fopen($filename, "w");
}
foreach ($get As $line) {
if (trim($line) != "<?php" && trim($line) != "?>") {
$p = explode("=", $line);
$this->data[trim($p[0])] = trim($p[1]);
}
}
$this->fp = fopen($filename, "w");
}
public function get($var) {
return (isset($this->data[$var]) ? $this->data[$var] : 0);
}
public function set($var, $value) {
$this->data[$var] = $value;
}
public function __destruct() {
fwrite($this->fp, "<?php\n");
foreach ($this->data As $k => $v) {
fwrite($this->fp, $k.'='.$v."\n");
}
fwrite($this->fp, "?>\n");
fclose($this->fp);
}
}
?>
Submit a correction or amendment below.
Make A New Post