9072997/auto-template

automagically make simple PHP scripts look like real websites

v2.1.1 2020-06-29 15:12 UTC

This package is auto-updated.

Last update: 2024-04-26 01:03:34 UTC


README

A PHP library to automagically make simple PHP scripts look like real websites

<?php
require_once __DIR__ . '/vendor/autoload.php';
use AutoTemplate\AutoTemplate;

new AutoTemplate('My Website', [
    'Home' => '/',
    'Page 1' => 'page1.php',
    'Google' => 'http://google.com'
]);

echo "here is an <b>HTML</b> fragment";

page templated with auth-template

Installing with Composer

  • run composer require 9072997/auto-template.
  • If you don't have require_once __DIR__ . '/vendor/autoload.php'; at the top of your scripts already, add it.

Installing without Composer

Download AutoTemplate.php and require it in your script