26 lines
354 B
PHP
26 lines
354 B
PHP
|
|
<?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);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|