I used this little tutorial (admittedly it's several years old, but I have no reason to believe it doesn't work still), as the framework provided definitely works, and I quite liked the abstraction.
However, what I'm having trouble with is referencing the $config arrays from another page.
Code: Select all
$config = array(
"db" => array(
"db1" => array(
"dbname" => "myDatabase",
"username" => "dbUser",
"password" => "myPassword",
"host" => "localhost"
),
),
"urls" => array(
"baseUrl" => "http://example.com"
),
"emails => array(
"hello" => "hello@mywebsite.com",
"admin" => "admin@mywebsite"
),
"paths" => array(
"resources" => "/path/to/resources",
"images" => array(
"content" => $_SERVER["DOCUMENT_ROOT"] . "/images/content",
"layout" => $_SERVER["DOCUMENT_ROOT"] . "/images/layout"
)
)
);

Solutions/wider issues/things to try?
EDIT: The general error is that the $config variable doesn't exist, but it seems to be getting called via the index.php in the example, with the line require_once(realpath(dirname(__FILE__) . "/../../resources/config.php"));.