Как поставить код на редиректный сайт?
Есть сайт.
В корне лежит index.php, который содержит код: <?php header('Location: pub/index.php'); ?> Соответственно pub/index.php содержит: <?php require_once '../lib/settings.inc'; if (defined('IS_DEBUG')) if (1 == IS_DEBUG) require_once '../component/fx/tm_in.inc.php'; // require_once '../component/shared.inc.php'; require_once '../lib/smarty/Smarty.class.php'; $tpl =& new Smarty; $tpl->assign('page', 'news_list'); $tpl->display('common.tpl'); if (defined('IS_DEBUG')) if (1 == IS_DEBUG) require_once '../component/fx/tm_out.inc.php'; /* require_once '../lib/smarty/Smarty.class.php'; $tpl =& new Smarty; $tpl->assign('page', 'index'); $tpl->display('common.tpl'); */ ?> PHP код сапы вставляю в templates/common.tpl При регистрации в сапе указываю тему и урл видов: site.ru site.ru/index.php site.ru/pub/index.php site.ru/temmlates/common.tpl однако на сайте во всех случаях выводится return_links(); ?> Добавлял AddHandler application/x-httpd-php .php .htm .html но хостинг итак 100% поддерживает PHP Помогите правильно установить код. |
в поиске ищите smarty
|
все правильно шаблон и выводит.
В данном случае необходимо код Сапы вставлять в pub/index.php в виде /*----*/ все что до return_links(); /*----*/ $tpl->assign('SAPE', $sape->return_links()); а в шаблон templates/common.tpl в нужном месте вставить {$SAPE} все будет отлично работать. У меня работает :) |
Часовой пояс GMT +3, время: 15:03. |
Работает на vBulletin® версия 3.8.7.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot
SAPE.RU — система купли-продажи ссылок с главных и внутренних страниц сайтов.