Skip to content

Commit

Permalink
adding Twig initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
detain committed Aug 15, 2019
1 parent 5582489 commit 01da67e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@

global $db;
$db = new \Workerman\MySQL\Connection($config['db_host'], $config['db_port'], $config['db_name'], $config['db_user'], $config['db_pass']);

global $twig;
$twigloader = new \Twig_Loader_Filesystem(__DIR__.'/Templates');
$twig = new \Twig_Environment($twigloader, array('/tmp/twig_cache'));
/* echo $twig->render('views/server/authorize.twig', array(
'account_lid' => $GLOBALS['tf']->accounts->data['account_lid'],
'client_id' => $_GET['client_id'],
'response_type' => $_GET['response_type'],
'queryString' => $_SERVER['QUERY_STRING']
)); */

0 comments on commit 01da67e

Please sign in to comment.