load->helper('file'); $this->load->model('logbook_model'); $data['qsos'] = $this->logbook_model->get_clublog_qsos(); // Create ADIF File of contacts not uploaded to Clublog $string = $this->load->view('adif/data/clublog', $data, TRUE); if ( ! write_file('uploads/clublog.adi', $string)) { echo 'Unable to write the file - Make the folder Upload folder has write permissions.'; } else { echo "uploads/clublog.adi file created."; } } }