preparations for rewrite

This commit is contained in:
christian committed 2025-01-11 23:14:09 +01:00
1 parent 637a781f24
commit cf07363a8d
39 files changed
+105 -66

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
<?php
function renderTemplate($templatename,$variables=[],$basepath=ROOT.'/src')
{
ob_start();
if(is_array($variables))
extract($variables);
if(file_exists($basepath.DS.'templates'.DS.$templatename.'.php'))
include($basepath.DS.'templates'.DS.$templatename.'.php');
else if(file_exists($basepath.DS.'templates'.DS.$templatename))
include($basepath.DS.'templates'.DS.$templatename);
$rendered = ob_get_contents();
ob_end_clean();
return $rendered;
}