Re: Self referencing
- From: "Shelly" <sheldonlg.news@xxxxxxxxxxxxxxxx>
- Date: Fri, 28 Apr 2006 15:18:25 -0400
"Kevin Wells" <kev.wells@xxxxxxxxxxxxx> wrote in message
news:d4f8aa1e4e.Kevin@xxxxxxxxxxxx
In message <44521287$0$30719$5a62ac22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
TreatmentPlant <treatmentplant@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
How can I write a PHP code to find the URL on which the code the itself
is running?
Sorry about the question: it's a bit difficult to describe, so here is
what I am trying to achieve...
...in sort of LogicCode
If this is NOT the home page then
associate the company logo with a link to the home page
else
just display the logo without any linking reference.
TIA
On the home page have something like this
<? $page="home" ?> and on the other pages
<? $page="nothome" ?>
Then where you want the image to be have
<?
if ($page=="nothome") {
Code fopr company logo and link to home page code
}
else
{
Code for logo withouth link to home page
}
?>
Actually, all he need do is on the homepage
<?php $page="something" ?>
and on all pages do
if (isset($page)) {
....
} else {
....
}
Shelly
.
- References:
- Self referencing
- From: TreatmentPlant
- Re: Self referencing
- From: Kevin Wells
- Self referencing
- Prev by Date: Re: formatting time
- Next by Date: PHP eating up server resources!
- Previous by thread: Re: Self referencing
- Next by thread: Re: Self referencing
- Index(es):
Relevant Pages
|