public function exportcsv() { require_once JPATH_COMPONENT . '/helpers/export.php'; $model = $this->getModel('Subscribers'); $filename = JText::_('COM_RSMEMBERSHIP_SUBSCRIBERS'); RSMembershipExport::buildCSVHeaders($filename); $input = JFactory::getApplication()->input; $fileHash = $input->get('filehash'); echo RSMembershipExport::getCSV($fileHash); JFactory::getApplication()->close(); }