For example, say QLS was installed in the root of the site and is accessible as follows:
- Code: Select all
/login.php
/register.php
/...
...but wait! Your organizational requirements/skillz are waaay beyond simply putting everything in the root. You decide to use folders, only to find that QLS doesn't seem to have any effect on the new test files. Low and behold, the solution to your problems!
- Code: Select all
// you're in /something/else/here/
$main_directory = str_replace('/something/else/here', dirname(__FILE__));
define('QUADODO_IN_SYSTEM', true);
require_once($main_directory . '/header.php');
Just use that at the top of any new PHP file you want to protect, being careful to CHANGE the folder location.
