Skip to content

Instantly share code, notes, and snippets.

@im-samir-dev
Created April 28, 2018 15:29
A simple function to import file instead require or include
<?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