Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 620 Bytes

Readme.md

File metadata and controls

36 lines (23 loc) · 620 Bytes

tiny-ssi

A minimal implementation of Apache SSI (server-side includes) for PHP 5.4+

Usage

Currently only supports doing includes, set var and echo var.

 <!--#include virtual="header.html" -->

    <div class="container">
        <h1>title</h1>
        <p class="lead">
          contents
        </p>
    </div>
 <!--#include virtual="footer.html" -->

expecting that 'header.html' and 'footer.html' are in the same folder as the above html file, you can then do:

require_once('tiny_ssi.php');

$parser = new TinySSI;
echo $parser->parse('/test/ssi_test_body.html');

License

MIT