Skip to content

Commit

Permalink
Basic Structures
Browse files Browse the repository at this point in the history
  • Loading branch information
khoaofgod committed Feb 1, 2015
1 parent 34781f1 commit 918b851
Show file tree
Hide file tree
Showing 10 changed files with 887 additions and 0 deletions.
1 change: 1 addition & 0 deletions phpnosql/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deny from all
29 changes: 29 additions & 0 deletions phpnosql/_base.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

if(!function_exists("_db")) {
function _db($database = "mydb") {
if(!isset(_noSQL_Static::$instances[$database])) {
_noSQL_Static::$instances[$database] = new noSQLPDO($database);
}
return _noSQL_Static::$instances[$database];
}
}

function _noSQL($database = "mydb") {
if(!isset(_noSQL_Static::$instances[$database])) {
_noSQL_Static::$instances[$database] = new noSQLPDO($database);
}
return _noSQL_Static::$instances[$database];
}

class _noSQL {
function __construct($database) {
return _noSQL($database);
}
}

class _noSQL_Static {
public static $instances;
}

require_once(dirname(__FILE__)."/_sources/".NOSQL_VERSION."/pdo.php");
15 changes: 15 additions & 0 deletions phpnosql/_config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

// Default is ./_database/ - However, I recommened put it in security folder on your server
// Example: outside public_html and www
define("NOSQL_DATABASE_PATH",dirname(__FILE__)."/_database/");

// Set it to Write Permission change it if you know what you doing.
define("NOSQL_PERMISSION", 0777);

// change to upgrade to new version
define("NOSQL_VERSION","release2.0");

// e-mail report problems - Bugs Tracking
define("NOSQL_EMAIL_ADMIN","[email protected]");

1 change: 1 addition & 0 deletions phpnosql/_database/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deny from all
1 change: 1 addition & 0 deletions phpnosql/_sources/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deny from all
3 changes: 3 additions & 0 deletions phpnosql/_sources/release2.0/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

header("location: http://www.php.social");
Loading

0 comments on commit 918b851

Please sign in to comment.