mtn_man
January 21st, 2008, 02:31 PM
I seem to be having a problem getting my php vars to show up in my html files.
I know that php is enabled and running on my server as a module of apache and have successfully gotten the famous phpinfo() method to run and display in a browser, but I cannot get even the simplest of output to display when I try to embed some php into an HTML file.
Here is what I have tried:
<?php
echo rand();
?>
yields nothing...
This also is not working:
<?php
$num = 10;
?>
in HTML file:
<p>This is a number from php: <?php echo $num; ?> </p>
I am not sure if I just have my syntax messed up or if I am missing some php/apache config directive or what?
Thanks in advance for any help you might have to offer,
mtn_man
I know that php is enabled and running on my server as a module of apache and have successfully gotten the famous phpinfo() method to run and display in a browser, but I cannot get even the simplest of output to display when I try to embed some php into an HTML file.
Here is what I have tried:
<?php
echo rand();
?>
yields nothing...
This also is not working:
<?php
$num = 10;
?>
in HTML file:
<p>This is a number from php: <?php echo $num; ?> </p>
I am not sure if I just have my syntax messed up or if I am missing some php/apache config directive or what?
Thanks in advance for any help you might have to offer,
mtn_man