php - Possible to remove included classes? -
i using 3rd party file manager plugin on cms , want include authentication check php framework i'm using. authentication part works fine, simple include auth check, there seems conflict between included classes , of file manager. example, i'm getting "class kohana not found" error class belonging file manager trying instantiate class belonging framework.
at top of file manager main entry file, have following:
//load kohana framework authorisation include('../../../../../admin/index.php'); // if not valid authenticated user, kill page if ( ! auth::instance()->logged_in()) { die('unauthorized'); } having done authentication, no longer want included files , classes, these seemingly conflicting file manager. there way can this, or misunderstanding what's going on here?
the error being thrown in file manager class - public_html/media/js/tiny_mce/plugins/ajaxfilemanager/inc/class.file.php [ 67 ]
function file($path=null) { $this->__construct($path); }
class xyz not found not sign of conflict - kohana bootstrap doesn't loaded.
there's no way "unload" classes within php script. if 2 packages share class name, you'll have load them in separate scripts, or move 1 of them separate namespace (requires php 5.3+). said, in case, need load correct bootstrap file include needed classes.
Comments
Post a Comment