Can't learn how to import php files into my joomla component- many of these fail:

  • require_once('code.php')
  • require_once(dirname(FILE).DS.'code.php')
  • require_once(JPATH_COMPONENT.DS.'code.php' )

Any ideas? thanks

Try jimport, see Joomla's paperwork about this: http://docs.joomla.org/Jimport

jimport('joomla.application.component.controller');

This can range from the php file "/libraries/joomla/application/component/controller.php".