Did you try it as a virtual include?
<!--#include virtual="foldername/scriptname.php-->
For example, if I'm adding a "visitors online" php script names "visitors.php" to an shtml page, and the script is in a folder called "online", I would use this...
<!--#include virtual="online/visitors.php"-->
See if that helps.