1
0
www.mikescher.com/framework/gii/views/common/code.php

16 lines
336 B
PHP
Raw Normal View History

2014-05-13 12:40:42 +02:00
<?php
if($file->type==='php')
{
echo '<div class="content">';
highlight_string($file->content);
echo '</div>';
}
elseif(in_array($file->type,array('txt','js','css')))
{
echo '<div class="content">';
echo nl2br($file->content);
echo '</div>';
}
else
echo '<div class="error">Preview is not available for this file type.</div>';
?>