PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Yorch Ponce   V3ctor WareHouse   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: V3ctor WareHouse
Store and retrieve objects in MongoDB and MySQL
Author: By
Last change: composer, jsonp
Date: 4 years ago
Size: 829 bytes


Class file image Download
require 'config.php';

// For JavaScript SDK
header("Access-Control-Allow-Origin: *");

// Init Database Connection
V3WareHouse::getInstance("v3MongoDB", $hostname, $username, $password, $dbname, $port);

// Init Application
$app = new V3Application($dbname, $key);

// Add Custom Route
$app->addRoute('/openshift', function () {
$app = \Slim\Slim::getInstance();

$app->response()->header('Content-Type', 'application/json');

$msg = array("msg" => "Hello localhost !!!");

$envvar = getenv('OPENSHIFT_MONGODB_DB_HOST');

                if (! empty(
$msg = array("msg" => "Hello Openshift !!!");

// Start V3ctor Application