Postingan lainnya
Ini_set(): headers already sent. you cannot change the session module's ini settings at this time
<?php
class Mahasiswa extends CI_Controller {
public function __construct(){
parent:: __construct();
$this->load->model('mod_mahasiswa');
}
public function index() {
$data['record']= $this->mod_mahasiswa->select_all()->result();
$this->load->view('halaman_admin/v_admin',$data);
}
public function simpan_data()
{
$this->mod_mahasiswa->simpan_data();
$data['mhs'] = $this->mod_mahasiswaa->get_mhs();
$data['c_mhs'] = $this->mod_mahasiswa->count_mahasiswa();
$this->load->view('halaman_admin,v_admin',$data);
}
public function tambah(){
$this ->load->view('halaman_admin/post_mhs');
}
public Function edit() {
if (isset($_POST['submit'])) {
$this->mod_mahasiswa->update();
redirect('Mahasiswa');
} else {
$id = $this->uri->segment(4);
$data['row'] = $this->db->get_where('Platform_Mobile', array('NIM' => $NIM))->row_array();
$this->template->load('halaman_admin/edit', $data);
}
}
Public function delete(){
$this->db->where('NIM');
$this->db->delete('Platform_Mobile');
redirect('Mahasiswa'); }
}
?>
0
3 Jawaban:
mungkin terdapat Whitespace pada codingan, coba tuliskan perintah: ob_start(); paling atas di file codingnya
0
Tanggapan
Saat di hosting tpi di lokal gak eror sih
Ini nulis y di contoler atau di view y
Saat di hosting eror tpi di local bisa jalan Lancer
0