<?php
$prg = file_get_contents(implode('/',[$_SERVER['DOCUMENT_ROOT'],'../miser-vars/PRG/MISER.BAS']));
$Pattern=file_get_contents(implode('/',[$_SERVER['DOCUMENT_ROOT'],'../miser-vars/regex/LINES.re']));
$pagedata=file_get_contents(implode('/',[$_SERVER['DOCUMENT_ROOT'],'../miser-vars/html/index.html']));
$PRG2='';
$PRG2.= '<table><tbody>';
while(true)
{
while(true)
{
if(strlen($prg)===0){break 1;}
preg_match($Pattern,$prg,$matches);
file_put_contents
(
implode
(
'/',
[
$_SERVER['DOCUMENT_ROOT'],
'../miser-vars/PRG/'.
$matches['linelabel'].'.BAS'
]
),$matches['linelabel'].$matches['sep'].$matches['code']
);
$prg=str_replace($matches['linelabel'].$matches['sep'].$matches['code'],'',$prg);
$PRG2.= '<tr><td>PRG['.htmlentities($matches['linelabel']).']</td></tr><tr></td>'.htmlentities($matches['code']).'</td></tr>';
}
}
$PRG2.= '</tbody></table>';
$pagedata=str_replace('{{ title }}','Miser Ripper',$pagedata);
$pagedata=str_replace('<< page >>',$PRG2,$pagedata);
echo $pagedata;
exit;
preferences:
60.59 ms | 402 KiB | 5 Q