Handy Use of PHP’s __FILE__ Constant

That you can use it to get parent directory:
dirname(dirname(__FILE__))
or you can include the init.php file from anywhere in your filesystem:
You would use
include_once(dirname(__FILE__) . ‘/database.class.php’); in the init.php

CategoriesUncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *