Просмотр поста #534311: У Вас есть один вопрос? - Тогда задайте его тут! new!

.
Бермудский
Треугольник
<?php
define('_IN_JOHNCMS', 1);
$textl ='fix.relax-vsem.ru';
$rootpath='';
require_once ('incfiles/core.php');
require_once ('incfiles/head.php');
        $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `paper` "), 0);
        if ($total) {
    $req = mysql_query('select * from `paper` order by `time` desc limit 3;');
     $i = 0;
            while ($res = mysql_fetch_array($req)) {
                echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
                if (file_exists(('../files/paper/' . $res['id'] . '_preview.jpg')))
                echo '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="left" valign="top">' . '<img src="../files/paper/' . $res['id'] . '_preview.jpg  "width="50" height="50" align="left" hspace="6" vspace="6" alt="photo" /><p><a href="index.php?act=readmore&amp;id=' . $res['id'] . '"><h3>' . $res['name'] . '</h3></a>' . '&#160;(' . functions::display_date($res['time']) . ')</small></div></p>';
     
    $i++;
            } 
        }
     
    require_once ('incfiles/end.php');
?>

Проинклудил, но что-то не отоброжает. Мне на главную не нужно.
Как верно нужно - чтобы файл открывался по следующему пути:
сайт.ру/newspaper/файл.php