You are here: Re: Avoiding Duplicating Code « HTML « IT news, forums, messages
Re: Avoiding Duplicating Code

Posted by Robb on 11/16/06 16:15

Thanks, I'll give this a try.


On Tue, 14 Nov 2006 23:31:45 -0000, "password" <fatpipe@epiptaf.com> wrote:

>
>"Robb" <robbDELETE@DELETEtarus.com> wrote in message
>news:auakl2dej4fvagkvh8c80f103hlm38s9kg@4ax.com...
>> My header (images and a couple links), main menu, and footer are the same
>on all pages. Can they be
>> put into an external file instead of duplicated on every page?
>>
>php and includes
>
>make main content bit a php file
>make your header menu etc a separate html file
>make footer a separate html file
>
>then at top and bottom of php page do
>
><?php
>include('whereeveritis/header.html');
>?>
>
>php content stuff goes here
><?php
>include('whereeveritis/footer.html');
>?>
>
>'whereveritis' is the route to the html files
>you may have to fiddle with route to your css because the 'includes' think
>(behave as if) they are where the php page is located even if they are in a
>different folder
>
>i hope that is clear
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация