Skip to content

Commit 918b851

Browse files
committed
Basic Structures
1 parent 34781f1 commit 918b851

File tree

10 files changed

+887
-0
lines changed

10 files changed

+887
-0
lines changed

phpnosql/.htaccess

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deny from all

phpnosql/_base.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
if(!function_exists("_db")) {
4+
function _db($database = "mydb") {
5+
if(!isset(_noSQL_Static::$instances[$database])) {
6+
_noSQL_Static::$instances[$database] = new noSQLPDO($database);
7+
}
8+
return _noSQL_Static::$instances[$database];
9+
}
10+
}
11+
12+
function _noSQL($database = "mydb") {
13+
if(!isset(_noSQL_Static::$instances[$database])) {
14+
_noSQL_Static::$instances[$database] = new noSQLPDO($database);
15+
}
16+
return _noSQL_Static::$instances[$database];
17+
}
18+
19+
class _noSQL {
20+
function __construct($database) {
21+
return _noSQL($database);
22+
}
23+
}
24+
25+
class _noSQL_Static {
26+
public static $instances;
27+
}
28+
29+
require_once(dirname(__FILE__)."/_sources/".NOSQL_VERSION."/pdo.php");

phpnosql/_config.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
// Default is ./_database/ - However, I recommened put it in security folder on your server
4+
// Example: outside public_html and www
5+
define("NOSQL_DATABASE_PATH",dirname(__FILE__)."/_database/");
6+
7+
// Set it to Write Permission change it if you know what you doing.
8+
define("NOSQL_PERMISSION", 0777);
9+
10+
// change to upgrade to new version
11+
define("NOSQL_VERSION","release2.0");
12+
13+
// e-mail report problems - Bugs Tracking
14+
define("NOSQL_EMAIL_ADMIN","[email protected]");
15+

phpnosql/_database/.htaccess

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deny from all

phpnosql/_sources/.htaccess

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deny from all
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
header("location: http://www.php.social");

0 commit comments

Comments
 (0)