Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
/ tiny-ssi-php Public archive
forked from alexxwiz/tiny-ssi-php

Tiny SSI - Apache Server Side Includes parser for PHP

License

Notifications You must be signed in to change notification settings

pastusiak/tiny-ssi-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiny-ssi-php

A minimal implementation of Apache SSI (server-side includes) for >= PHP 5.6

Usage

Supports:

  • include file
  • include virtual
  • set var
  • echo var
<!--#include virtual="ssi_test_header.html" -->

<!--#set var="title" value="My Title" -->

<div class="container">
    <h1><!--#echo var="title" --></h1>
    <p class="lead">
        contents
    </p>
</div>

<!--#include file="ssi_test_footer.html" -->

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

$parser = new Pastusiak\TinySSI();
$combined = $parser->parse('ssi_test_body.html');

License

MIT

About

Tiny SSI - Apache Server Side Includes parser for PHP

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 79.4%
  • HTML 20.6%