Created
April 28, 2018 15:29
-
-
Save im-samir-dev/25decea21b8c40594e6ee504222ee32f to your computer and use it in GitHub Desktop.
A simple function to import file instead require or include
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function import($caller_file, $package, $script) { | |
require_once(realpath(dirname($caller_file) . "/" . $package . "/" . $script)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment