I am in the process of creating a parser, the following is the code i have started with:
<?php
/* © MMVI weiqiang's minisite productions
This programme is intented to be used only on weiqiang's minisite,and no unauthorised usage is allowed.
You may use the programme if only granted permission by the author.
Programme filename: manager.php
Programme function:
Programme authorised to: Original Copy(weiqiang's minisite)
*/
/*Start Of Programme*/
function parsedocument($document,$returnview=null){
//document is with regards to root folder
if(stristr($document,'.php')){
$handle = fopen($document, "r");
$contents = fread($handle, filesize($document));
fclose($handle);
sprintf($contents);
preg_replace("{title}","$title",$content);
}
/*elseif(!stristr($document,'.php')){
die(error_note(1010));
return false;
}*/
}
parsedocument('bbcode.php');
?>
But i am having a problem of "printing" out the final code
as print() does not support anything other than variable,html and characters right?I mean it doesn't suppot those "<?php" and "?>".
What should i do?