me@helium 7 年 前
コミット
2c6078ed41
3 ファイル変更16 行追加1 行削除
  1. 3 1
      README.md
  2. 3 0
      TemplateEngine/templates/index.tpl
  3. 10 0
      TemplateEngine/twig_test.php

+ 3 - 1
README.md

@@ -1,3 +1,5 @@
 # ER-SQL
 
-ER && SQL part of PHP Advanced
+ER && SQL part of PHP Advanced
+
+

+ 3 - 0
TemplateEngine/templates/index.tpl

@@ -0,0 +1,3 @@
+<html>
+<a href="{{ url }}">{{ urlText }}</a>
+</html>

+ 10 - 0
TemplateEngine/twig_test.php

@@ -0,0 +1,10 @@
+<?php
+require_once '/usr/share/php/Twig/Autoloader.php';
+Twig_Autoloader::register();
+$loader = new Twig_Loader_Filesystem('templates/');
+$twig = new Twig_Environment($loader, array(
+			'cache' => '/tmp/',
+			));
+
+echo $twig->render('index.tpl', array('url' => 'http://google.com',
+			'urlText' => 'Гугл'));