/    Sign up×
Community /Pin to ProfileBookmark

Page Header

Hi there,

Im a novice with php but can i use it to add a header section to the top of each page on my site instead of using frames etc.

So all i would do is add the line of code, then the pre-made header area will be there at the top. This area would include such things as the logo, links etc.

I have php on my host server.

Thanks for your help….

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@The_Little_GuySep 05.2006 — Like this?
[code=php]<?
include('filename.php');
?>[/code]
Copy linkTweet thisAlerts:
@ts01authorSep 05.2006 — thanks, would i just have this code as the first line in my body or would i put this anywhere else to ensure it always stays at the top.

thanks
Copy linkTweet thisAlerts:
@The_Little_GuySep 05.2006 — just put that where ever you want that file to display.
Copy linkTweet thisAlerts:
@ts01authorSep 05.2006 — great, that seems to work but the only problem i have is my logo... my header.php is in my home folder with and there is a link to my logo image on this page. If i add the header to each page in all the sub directories, the header appears without the logo...is there a way around me having to put a copy of the logo image in each of the folders that i want the header to appear in?

Thanks
Copy linkTweet thisAlerts:
@The_Little_GuySep 05.2006 — <img alt="Logo" src="/path/to/image.jpg">

using a forward slash at the beginning of the src, will make the browser look in the root directory first and work its way to the file.
Copy linkTweet thisAlerts:
@ts01authorSep 05.2006 — great thanks
×

Success!

Help @ts01 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...