iLexN
1/15/2014 - 6:07 AM

getcomposer

getcomposer

require_once 'vendor/autoload.php';


$html = new \simple_html_dom();



//db config
$host = "pacificprime.com";
$dbname = "uaehealt_db1";
$dbusername = "uaehealt_db1";
$dbpassword = "uaedb1@#";


ORM::configure('mysql:host=' . $host . ';dbname=' . $dbname);
ORM::configure('username', $dbusername);
ORM::configure('password', $dbpassword);
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
ORM::configure('return_result_sets', true);


$app = new \Slim\Slim();


$loader = new Twig_Loader_Filesystem('template');
$twig = new Twig_Environment($loader);

$template = $twig->loadTemplate('path.html');
$t = $template->render($out);
echo $t;

curl -sS https://getcomposer.org/installer | php

create composer.json

php composer.phar install
{
        "require" : {
                "twig/twig": "1.*",
                "j4mie/paris": "v1.4.2",
                "j4mie/idiorm": "v1.4.1",
                "slim/slim": "2.*",
                "simple-html-dom/simple-html-dom": "1.5.0",
                "phpmailer/phpmailer": "v5.2.7"
        },
        "autoload": {
                "classmap": [
                        "vendor/simple-html-dom/simple-html-dom/"
                ]
        }
}