0

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">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!

4

2 回答 2

5

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.

于 2008-11-25T00:50:32.900 回答
0

将您的代码更改为:

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

......你会是金色的。

于 2009-11-15T21:18:03.157 回答