Files
vij/src/createblock.php

26 lines
354 B
PHP
Raw Normal View History

2021-11-03 00:08:16 +03:00
<?php
function create_block($block){
$blockfile = BASE_VIJ.'blocks/'.$blockpath.$block.'.php';
if (!file_exists($blockfile))
return false;
$cachefile = VIJ_CACHE.$block.'.html';
ob_start();
include $blockfile;
$html = ob_get_contents();
ob_end_clean();
return file_put_contents($cachefile, $html);
}