I m在使用一些SSI的网站上工作。 由于这些是静态的,因此,作为<代码>.shtml的页码,而不是转换为.php
。 现在的问题是,在其中之一,我要生动地把一些内容带进了营地。 采取下列正确方式,还是找到其他/更好的解决办法。 我现在做的是:
<!--test.shtml-->
<!DOCTYPE html>
<html lang="en" dir="ltr">
<body>
<!--#include virtual="/test.php" -->
</body>
</html>
<!--test.php-->
<?php echo Hello from php ; ?>
I ve read that this shouldn t work but where I read that, it was referring to Apache 1.3. On my server at home I m running Apache 2.[something] and it works fine, it also works on the server where the site will be hosted. So is this something that didn t work in 1.3 but does in 2 or am I just getting lucky somehow and really should be doing it a different way?
内容I m的生成只是为现场的导航添加一个门类/门类,以突出目前这一页,因此,PHP似乎没有什么超高技能,因为它在首次产生后将大量固定下来,我可以把PHP的产出放在服务器Ippose上,但也许首先有更好的方式这样做(?)。
感谢您的帮助。
EDIT - Not an answer, but in relation to my alternative method question. I found a perhaps more suitable (I hesitate to say cleaner, since I m sure that can be argued til the cows come home) method for my situation. Since I am not currently using PHP for anything else on the site, I ll stick with it for now. It is as outlined by Dan M here.