Skip to content

Tiny SSI - very small Server Side Includes parser for PHP 5.4+

License

Notifications You must be signed in to change notification settings

alexxwiz/tiny-ssi-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Tiny SSI - very small Server Side Includes parser for PHP 5.4+

Resources

License

Stars

Watchers

Forks

Packages

No packages published