- Installation
- Configuration
- Usage
To install Mercury, simply unzip it into your folder.
To uninstall Mercury, simply delete the folder you unzipped and remove all references to it in your source files.
Now before you can get it working, you'll have to change some configuration options. You'll need to:
- Specify your directory separator
- Name your site
Your directory separator will be different depending on the OS of the server you're going to be running Mercury on.
Go into config.php and change:
define('DS', 'DIRECTORY_SEPARATOR');
to
define('DS', '\\');
Go into config/config.php and change:
define('DS', 'DIRECTORY_SEPARATOR');
to
define('DS', '/');
Now it's time to name your site - a very important occasion indeed!
Let's say you want to name your blog something like, "CLVF". To do so, go into config/config.php and change:
define('SITE_TITLE', '[YOUR SITE TITLE]');
to
define('SITE_TITLE', 'CLVF');
Congratulations! You've just named your site "CLVF"! Now you'll be able to access your site's title from Mercury.
Now that you've hopefully configured Mercury correctly, it's time to implement it.
To use Mercury, you must do two (2) things:
- Include Mercury.php at the top of your source file.
- Load whatever classes you need and instantiate them.
To include Mercury.php in your file, add the following line inside of your opening PHP tags:
require 'Mercury.php';
To load a class, simply insert the following line after you've included Mercury.php in your file:
load('[Filename of class to load]');