Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Best way to use a header include file?

Reply
Thread Tools

Best way to use a header include file?

 
 
John Dalberg
Guest
Posts: n/a
 
      09-20-2005


I created a header file to be included in every webpage. The header file
has images that have a path to an "images" folder off the root folder.
However if I use this header file for web pages that reside in subfolders,
I have to change the path of all the image links to '../images/' instead of
'images/'.

What's the best way to have a single header file which *any* web page,
regardless of its location, can use without modifying it to suit certain
webpages depending on their location?

--
John Dalberg
 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      09-20-2005
John Dalberg wrote:
>
> I created a header file to be included in every webpage. The header file
> has images that have a path to an "images" folder off the root folder.
> However if I use this header file for web pages that reside in subfolders,
> I have to change the path of all the image links to '../images/' instead

of
> 'images/'.
>
> What's the best way to have a single header file which *any* web page,
> regardless of its location, can use without modifying it to suit certain
> webpages depending on their location?


/images/

Cheers
Richard.


 
Reply With Quote
 
 
 
 
boclair
Guest
Posts: n/a
 
      09-20-2005
John Dalberg wrote:
>
> I created a header file to be included in every webpage. The header file
> has images that have a path to an "images" folder off the root folder.
> However if I use this header file for web pages that reside in subfolders,
> I have to change the path of all the image links to '../images/' instead of
> 'images/'.
>
> What's the best way to have a single header file which *any* web page,
> regardless of its location, can use without modifying it to suit certain
> webpages depending on their location?
>

Is this PHP you are talking about? In that case at least header
locations MUST be absolute and is usually advisable.

For PHP, see http://au3.php.net/header

Louise
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
Re: Best way to use a header include file? Alan Silver ASP .Net 0 09-27-2005 02:01 PM
#include headers that include this header Aguilar, James C++ 2 07-16-2004 05:56 PM
Re: the use of #include <a_file.h> v/s #include"a_file.cpp" Rolf Magnus C++ 2 11-28-2003 12:26 PM



Advertisments