tags:

views:

121

answers:

2

Here's the code I have in the html file to "include" the file "vmenu.php"

  <div id="apDivVistaMenus">

?php
include 'vmenu.php';
?>

  !-- Begin Vista-Buttons.com -->

  !-- End Vista-Buttons.com -->

  /div>

The menus used to be between the comments below the php include request. But I save that code into the vmenu.php file, which looks like this:

link href="../menu-files/peaceland_styles_zkkus.css" type="text/css" rel="stylesheet"/>

  script type="text/javascript"> var vbImgPath="../menu-files/"</script>

  script type="text/javascript" src="../menu-files/sczkkus.js"></script>

  noscript><a href="http://vista-buttons.com"&gt;Xp Style Menu by Vista-Buttons.com v2.73</a></noscript>

What's the problem? They are both in the same directory. If I put the code from the vmenu.php back into the html file, it will load fine.

Thank you!

+5  A: 

Note that, in order for PHP includes to work, the file must be parsed by the PHP engine. By default, major web servers like Apache do not run .html files through the PHP interpreter, so you must either specify in your web server's configuration that you want to parse .html files as PHP files, or rename the .html file to a .php file.

Kamran
Everything is rockin' now!!!Got xampp all running, and even set it all up in DW CS3!!!You are all so amazingly helpful!!!
James Musser
A: 

Change your code to this:

<div id="apDivVistaMenus">
<!-- Begin Vista-Buttons.com -->
<?php include 'vmenu.php'; ?>
<!-- End Vista-Buttons.com -->
</div>

...and you'll be golden.

mattbasta