Websites - ZingPHP/Zing GitHub Wiki

Outdated. Do Not Use.

Zing can manage multiple websites all with the one framework. There is no need to copy the framework into multiple projects if you don't have to.

An example directory structure could look like this:

/
  /Zing
    /Zing.php
    /config.php
  /Websites
    /example1
    /example2
    /example3
  /index.php

Then within the config file, you would then add your website to the website array modifying the values to fit your needs.

<?php

$config = array(
    "websites" => array(
        array(
            "name" => "Example 1",
            "host" => "example1.com",
            "path" => "/Websites/example1"
        ),
        array(
            "name" => "Example 2",
            "host" => "example2.com",
            "path" => "/Websites/example2"
        ),
        array(
            "name" => "Example 3",
            "host" => "example.com",
            "path" => "/Websites/example3"
        ),
    )
);

Now, all you need to do is to point your websites to: index.php