showcode.php
<?php
$source = $file;
highlight_file( $source );
?>
showcode.php?file=to_study.php
In some cases to_study.php file gets processed and I do not get the highlighted code. Error something like:
Warning: Unterminated comment starting line 197 on line 3
I do not want to process the to_study.php file. I just want it to be highlighted in browser.
What php version are you using? You should get highlighted code even when there are syntax errors. Just disabling displaying errors or setting
error_reportingto 0 should prevent this warning to disrupt highlighted source.