Skip to content
Persona Clix edited this page May 13, 2018 · 1 revision

The aim for this development project is to make it as customisable and as unrestrictive as possible.

For too long, I have been developing things where I have enforced a certain file structure in order to make things work, well I got fed up of following my own restrictions, so I have tried my best to make this engine much better.

The intention being that every file that is meant to be editable, is created by you, and can be placed almost anywhere. I recommend keeping your own files outside the "PersonaClix" directory/folder, and keep it strictly for the engine itself, although this is entirely up to you.

Step 1

Download the engine and place the PersonaClix folder inside a folder called private outside of your public web root folder. Then place the autoload.php file inside the root of the private folder.

Step 2

Create a file called index.php inside your public web root folder, and require the autoload file.

require_once $_SERVER['DOCUMENT_ROOT'] . "/../private/autoload.php";

To make things easier later on, and because of namespacing, you might also want to put a use statement in below that for the main engine class.

use PersonaClix\Engine\PersonaClixEngine;

Step 3

To support multiple routes/pages, create a .htaccess file in your public web root folder. You may need to create this using your favourite code editor on some systems as it may not let you create files that start with a dot otherwise.

If you can't see the file, you may need to enable an option to show hidden files.

Place in the following code...

<IfModule mod_rewrite.c>

	RewriteEngine on

	RewriteCond %{REQUEST_FILENAME} !-l
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteRule ^(.*)$ index.php [QSA,L]

</IfModule>

All Done

That is the minimum you need to do to get setup with the engine. The rest is down to you.

Clone this wiki locally