Skip to content

Instantly share code, notes, and snippets.

@dirceu
Created May 21, 2010 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dirceu/408745 to your computer and use it in GitHub Desktop.
Save dirceu/408745 to your computer and use it in GitHub Desktop.
<?php
// Require specific controller if requested
if($controller = JPath::clean(JRequest::getWord('controller'))) {
$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
if (file_exists($path)) {
require_once $path;
} else {
$controller = '';
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment