including a php file in an html doc
| From: | Alexander Ross | Date: | Mon, 12 Aug 2002 03:17:46 +0000 |
| Subject: | including a php file in an html doc | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112091@lists.php.net to get a copy of this message | ||
I have a .php file whose purpose, ultimately, is to set one variable;
$hotspot. Now I want to include that var in a bunch of places in my html
page (it must remain html). So this was my thought. In the <head> include
the following:
<script language="php" src="hotspot.php"></script>
and then anywhere in the html doc I want to print the value of $hotspot I
type:
<?=$hotspot?>
but it doesn't work. I have a feeling I cant include a php script that way
because in trying to debug the problem I made the first line of hotspot.php
= echo "test"; and the word test never shows. What am I missing?
Thnks
Alex