<?php include "config.inc.php"; if (!class_exists("Database")) { include "db.class.inc.php"; } ...
I think it’s best to use absolute paths. I’ve seen this error with php5 and some open_base_dir php setting.
include(dirname(__FILE__).'/somefile.inc.php');
I was more thinking of $base_path
e.g. include $base_path."assets/snippet/mysnippet/myfile.php";
That could be an option, however, it would be nice to have getBasePath(), getBaseURL(), and getSiteURL() functions in the API for use in snippets and snippet includes, without having to declare it as a global everytime.