Цитата |
в index.php include munu.tpl include 1.tpl include 2.tpl include 3.tpl нажал на ссылку получилось в index.php include munu.tpl include 4.tpl include 5.tpl include 6.tpl |
Цитата |
да клева!!!!!!!!!!!!!! вырубился за компом... |
<?php echo getMenu(); ?>
<?php include_once ROOT.'tpl/'.$file; ?>
<b>Автомобили</b><br/><br/>
Это 1.tpl в котором<br/>
- 2.tpl<br/>
- 3.tpl<br/><br/>
<?php include_once ROOT.'tpl/2.tpl'; ?><br/>
<?php include_once ROOT.'tpl/3.tpl'; ?><br/>
Цитата (leonw @ 25.05.2016 - 23:29) |
хорошо, говорят: если правильно составить такой код, то сайт будет грузиться за секунды, а не грузить страницы заново... |
<?php echo getMenu(); ?>
<?php include_once ROOT.'tpl/'.$file; ?>
Цитата |
Чтобы не грузить страницы заново используют, ajax - javascript, тогда будет подгружаться только определенный контент(текст, картинки и т.д.) а основная часть страницы не будет обновляться. У Вас на сайте меню - ссылки на разные php файлы, поэтому страницы будут загружаться заново в любом случае. |
Цитата |
немного посмотрел: в index.tpl пишем: <?php echo getMenu(); ?> <?php include_once ROOT.'tpl/'.$file; ?> в 1.tpl пишем так: <b>Автомобили</b><br/><br/> Это 1.tpl в котором<br/> - 2.tpl<br/> - 3.tpl<br/><br/> <?php include_once ROOT.'tpl/2.tpl'; ?><br/> <?php include_once ROOT.'tpl/3.tpl'; ?><br/> |
Цитата |
leonw Вот этот код где ты увидел в index.tpl |
AddDefaultCharset UTF-8
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
php_flag register_globals Off
ErrorDocument 404 /404.html
Options All -Includes +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule "(^|/)\." - [F]
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)(/?)+$ index.php?rem=$1 [NC,L,QSA]
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule . /index.php [L,QSA]
</IfModule>
<html lang="ru-RU">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="noindex,nofollow,noodp,noydir" />
<title>Ошибка!!!</title>
</head>
<body>
Это ошибка 404 для
</body>
</html>