Как сделать чтобы файл работал в директории второго уровня, тоесть koren_sayta/papka/papka/ ??? Я делаю так:
<?php
define('_IN_JOHNCMS', 1);
$textl = 'Заголовок скрипта';
require_once ("../../incfiles/core.php");
require_once ("../../incfiles/head.php");
header("Content-type:text/html; charset=utf-8");
echo'Ваш код, либо текст';
echo $file;
require_once ("../../incfiles/end.php");
?>
выводит белую страницу.