lucy24 - 9:29 pm on Mar 7, 2013 (gmt 0)
Include your php script this way:
<?php include '../commentsdir/comments.php' ; ?>
Or rather, not this way, since the last thing you want is hard-coded relative links in a part of your html that you con't plan on changing often.
If you are lucky, there will be no difference between
<!--#include virtual="/directory/filename.php" -->
<!--#include virtual="/directory/filename.html" -->
as includes within the original (s)html file.
Careful! There's one format that only works if your server has mod_php. (MAMP does; my real server doesn't.) I think it was the simple "include" as opposed to "include virtual"; all I know is, I had to get rid of it everywhere.
Includes called from within php currently use the form
include ($_SERVER['DOCUMENT_ROOT'] . "/directory/filename.php");
If there exist common configurations where this would not work, I hope someone will tell me ahead of time.