PHP Classes

File: templating_engine/functions/templater.php

Recommend this page to a friend!
  Classes of jon   PHP Templating Engine   templating_engine/functions/templater.php   Download  
File: templating_engine/functions/templater.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Templating Engine
Process templates in PHP, JSON and CSS formats
Author: By
Last change: Update of templating_engine/functions/templater.php
Date: 1 year ago
Size: 710 bytes
 

Contents

Class file image Download
<?php

function templater_json($file)
{
   
/*
    $file = str_replace('<ar', '<article', $file);
    $file = str_replace('<b', '<button', $file);
    $file = str_replace('<c', '<content', $file);
    $file = str_replace('<d', '<div', $file);
    $file = str_replace('</ar', '</article', $file);
    $file = str_replace('</b', '</button', $file);
    $file = str_replace('</c', '</content', $file);
    $file = str_replace('</d', '</div', $file);
    */
   
   
$file = str_replace('S[', '_SESSION[\'', $file);
   
$file = str_replace(']S', '\']', $file);
   
   
file_put_contents('tmp.php', $file);

   
ob_start();
    include(
'tmp.php');
   
$html = ob_get_clean();

    return
$html;
}