Vertial Includes in PHP

NEWMAN

Live GEEK Radio
In .SHTML you can use the

[!--#include virtual="/page_head.htm" --] tag

how do I include pages like this using php?
 

fury

Administrator
Staff member
Well, I'm not sure if this is the most elegant way of doing so, but try...

PHP:
<?php
  if (file_exists($DOCUMENT_ROOT/path/to/file.txt)) 
  {
    readfile($DOCUMENT_ROOT/path/to/file.txt);
  }
?>
 

NEWMAN

Live GEEK Radio
OKOK I found the right command

[?php include( "d://hosting//crushme//page_head.htm" ); ?]

I like this (o;
 
Top