Skip to content

Instantly share code, notes, and snippets.

@gmann1982
Created July 4, 2013 13:24
Show Gist options
  • Save gmann1982/5927704 to your computer and use it in GitHub Desktop.
Save gmann1982/5927704 to your computer and use it in GitHub Desktop.
mobile config
<?php
ini_set('display_errors', 1);
require_once('../php-activerecord/ActiveRecord.php');
// require_once '../vendor/autoload.php';
define('BASEDIR', dirname(__file__));
//define('BASEURL', str_replace('m.', 'www.', $_SERVER['SERVER_NAME']));
define('BASEURL', 'www.'.$_SERVER['SERVER_NAME']);
//echo BASEURL;
include '../functions.php';
ActiveRecord\config::initialize(function($cfg){
$cfg->set_model_directory(BASEDIR.'/../models');
$cfg->set_connections(array(
'development' => 'mysql://root:root@localhost/fonesites'
));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment