-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
43 lines (37 loc) · 1.09 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* EasyMongo startup
*
* In here we define some default settings and start the configuration files
* @package easymongo
*/
/**
* Defining version number and enabling error reporting
*/
define("EASY_MONGO_VERSION", "1.0.0");
error_reporting(E_ALL);
/**
* Environment detection
*/
if (!version_compare(PHP_VERSION, "5.5")) {
exit("To make things right, you must install PHP5.6 or newer.");
}
if (!class_exists("MongoDB\Driver\Cursor") && !class_exists("MongoDB\Driver\Manager")) {
exit("To make things right, you must install php_mongodb module. <a href=\"https://www.php.net/manual/en/mongodb.installation.php\" target=\"_blank\">Here for installation documents on PHP.net.</a>");
}
// enforce Mongo support for int64 data type (Kyryl Bilokurov <kyryl.bilokurov@gmail.com>)
if (PHP_INT_SIZE == 8) {
ini_set("mongo.native_long", 1);
ini_set("mongo.long_as_object", 1);
}
/**
* Initializing configuration files and EasyMongo
*/
require_once __DIR__ . '/vendor/autoload.php';
require "config.php";
require "rock.php";
rock_check_version();
rock_init_lang();
rock_init_plugins();
Rock::start();
?>