Beispiel #1
0
 /**
 		Load a tpl file and parse its content
 			@param $file string
 	**/
 static function serve($file)
 {
     if (is_file($file)) {
         self::$text = file_get_contents($file);
         echo self::parse();
     } else {
         phex::error(404);
     }
 }
Beispiel #2
0
<?php

require_once '../lib/phex.php';
function test()
{
    echo "This is a test";
}
phex::set('TEST.ARRAY.VAR.VAR2', "valoresss");
phex::set('NOARRAY', "valore");
//phex::config('config.ini');
phex::routeGET("test", "/", function () {
    phex_tpl::serve("template.html");
});
//phex::route("test", "/", "example::test");
phex::route("test", "/@test1/ciao/test2", 'test');
phex::route("test", "/@test1/@plutone/@test2", 'test');
phex::route("test", "/@test1/ciao/@test2", 'test');
phex::run();
//echo phex::get('INI_ARRAY.TEST');