Welcome to Mercury!
Table of Contents
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
Specifying your directory separator
Your directory separator will be different depending on the OS of the server you're going to be running Mercury on.
If your server runs Windows:
Go into config.php and change:
If your server runs *nix, including OSX:
Go into config/config.php and change:
Naming your site
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]');
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:
Loading a class
To load a class, simply insert the following line after you've included Mercury.php in your file:
load('[Filename of class to load]');