Installing
Install
HLI should run out of the box. Just follow these steps:
- Download a release in your favourite compression format.
-
Decompress (unzip) it to your PHP include path. You don't have to create a
directory on your own. If you don't know your include path, create a PHP script
as follows and execute it:
<?php echo get_include_path(); ?>
-
-
If you are on Unix/Linux, you should create a symbolic link to the created
directory so you can use different versions of HLI (replace x.x.x with
the version number of your downloaded HLI):
$ ln -s HLI-x.x.x HLI
- If you are on Windows, you should rename the created directory to "HLI".
-
If you are on Unix/Linux, you should create a symbolic link to the created
directory so you can use different versions of HLI (replace x.x.x with
the version number of your downloaded HLI):
-
Go to a file of the application you want to use it in that is included in
every page (e.g. a basic function file or one with constants) and write at the
very top of it:
require_once 'HLI/init.php';
That's it, now you should be able to use the remote functions.
Turn it on and off
If you have soaked your application with HLI functions, it can be hard to find them
all to get the application to work on a production environment. And you surely
don't want to load all these classes all the time, that would be no good. Thank
gods there is an easy solution. Simply replace the require_once
from the install instructions by this:
HLI/dead.php is a drop-in for all the HLI functions that just do
… nothing. With this it is safe to leave your functions in your code,
and you can be sure that it will always have exactly the same set of functions.
You just have to figure out a way to set $debug to true or false.