import('phpquickprofiler/phpquickprofiler', 'vendor');I tried the same from a class within the app but got the following error: failed to open stream: No such file or directory in COREPATH/base.php @ line 25 After looking at the function
if ( ! function_exists('import')) { function import($path, $folder = 'classes') { $path = str_replace('/', DIRECTORY_SEPARATOR, $path); require_once COREPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php'; if (is_file(APPPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php')) { require_once APPPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php'; } } }I can see why it was failing, shouldn't the function be
if ( ! function_exists('import')) { function import($path, $folder = 'classes') { $path = str_replace('/', DIRECTORY_SEPARATOR, $path); if (is_file(COREPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php')) { require_once COREPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php'; } elseif (is_file(APPPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php')) { require_once APPPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php'; } } }or am I going about importing third party vendor libs the wrong way? Thanks for any advice
It looks like you're new here. If you want to get involved, click one of these buttons!