我有一个名为/lefnav的子目录文件夹
它包含以下文件:
background.jpg demo.html heading_bg.jpg jquery.js navigation.jpg sliding_effect.js styles.css tab_bg.jpg Thumbs.db Thumbs.db/encryptable
它实际上包含了本教程的所有元素:
http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-mootools-homepage-inspired-navigation-effect-using-jquery/
我想在php中包含整个文件夹,这样最终的结果就是(像这个演示):
http://d2o0t5hpnwv4c1.cloudfront.net/004_Moo/tutorial/demo/demo.html
到目前为止,我做得最好的是,即使我添加了.css和.js,它也根本不起作用:
<?php foreach (glob("leftnav/*html") as $filename) { include($filename); } ?>
我会想:
include("leftnav/demo.html");
单独使用应该是可行的,因为当我包含and.html文件时,它应该调用fot.css等,但我看到的情况并非如此。
真 的。
必须包含如下.js文件:
<script type="text/javascript" src="path/to/your/file"></script>
Css文件:
<link rel="stylesheet" type="text/css" href="path/to/your/css/file" />
所有这些都在一个.php文件中。