Loading ...
Sorry, an error occurred while loading the content.
 

Re: [codeigniter-id] Ga bisa upload file xls dan psf

Expand Messages
  • LuckyGuy354
    Walau 2 kemungkinan ini sangat kecil, tapi dicoba aja dulu. 1. Di /system/application/config/mimes.php, coba cek, apakah ada baris berikut? xls =
    Message 1 of 4 , May 1 12:35 AM
      Walau 2 kemungkinan ini sangat kecil, tapi dicoba aja dulu.
      1. Di /system/application/config/mimes.php, coba cek, apakah ada baris
      berikut?

      'xls' => array('application/excel', 'application/vnd.ms-excel',
      'application/msexcel'),

      Kalau tidak ada, tambahkan. Kalau di-comment, un-comment.

      2. Cek folder './media/files/', ada tidak? Permission foldernya bisa
      ditulisi tidak? Folder itu harusnya ada di bawah folder root, setara dengan
      folder '/system'

      Ya memang mestinya yang nomor 2 keluarnya pesan kalau directory yang dituju
      tidak ada atau tidak bisa ditulisi. Tapi namanya juga coba, kadang pesan
      error itu tidak pasti sesuai dengan kenyataannya.

      LuckyGuy354
      IT Beginner

      http://www.wiwid.org
      http://www.pocisoft.com, Website & Web-based Application Consultant

      ----- Original Message -----
      From: "kaka eriel" <kaka_eriel@...>
      To: <codeigniter-id@yahoogroups.com>
      Sent: Saturday, May 01, 2010 1:08 PM
      Subject: [codeigniter-id] Ga bisa upload file xls dan psf


      > Juragan kok ane ga bisa upload file xls ama psf yach
      >
      > nich script uploadnya
      > // MULAI
      > function upload_file(){
      > $config['upload_path'] = './media/files/';
      > $config['allowed_types'] = 'xls';
      > $config['max_size'] = '500';
      > $this->load->library('upload', $config);
      >
      > if ( ! $this->upload->do_upload()){
      > $error = array('error' => $this->upload->display_errors());
      > $this->load->view('upload_gagal', $error);
      > }
      > else{
      > $this->d = $this->upload->data();
      > $this->ModelSubmenu->upload_file($this->input->post('id'));
      >
      > redirect('adm_product/view_product/'.$this->input->post('idsub'));
      > }
      > }
      > //SELESAI
      >
      > yang keluar hasil gini mulu:
      > The filetype you are attempting to upload is not allowed.
    • PUTRA PRIMA
      yup mimme type nya :D 2010/5/1 LuckyGuy354 ... -- Putra Prima A 0410630078 Teknik Elektro Brawijaya 3 ipa 2 smunsa 2004
      Message 2 of 4 , May 1 4:25 AM
        yup mimme type nya :D

        2010/5/1 LuckyGuy354 <luckyguy354@...>

        >
        >
        > Walau 2 kemungkinan ini sangat kecil, tapi dicoba aja dulu.
        > 1. Di /system/application/config/mimes.php, coba cek, apakah ada baris
        > berikut?
        >
        > 'xls' => array('application/excel', 'application/vnd.ms-excel',
        > 'application/msexcel'),
        >
        > Kalau tidak ada, tambahkan. Kalau di-comment, un-comment.
        >
        > 2. Cek folder './media/files/', ada tidak? Permission foldernya bisa
        > ditulisi tidak? Folder itu harusnya ada di bawah folder root, setara dengan
        >
        > folder '/system'
        >
        > Ya memang mestinya yang nomor 2 keluarnya pesan kalau directory yang dituju
        >
        > tidak ada atau tidak bisa ditulisi. Tapi namanya juga coba, kadang pesan
        > error itu tidak pasti sesuai dengan kenyataannya.
        >
        > LuckyGuy354
        > IT Beginner
        >
        > http://www.wiwid.org
        > http://www.pocisoft.com, Website & Web-based Application Consultant
        >
        >
        > ----- Original Message -----
        > From: "kaka eriel" <kaka_eriel@... <kaka_eriel%40yahoo.com>>
        > To: <codeigniter-id@yahoogroups.com <codeigniter-id%40yahoogroups.com>>
        > Sent: Saturday, May 01, 2010 1:08 PM
        > Subject: [codeigniter-id] Ga bisa upload file xls dan psf
        >
        > > Juragan kok ane ga bisa upload file xls ama psf yach
        > >
        > > nich script uploadnya
        > > // MULAI
        > > function upload_file(){
        > > $config['upload_path'] = './media/files/';
        > > $config['allowed_types'] = 'xls';
        > > $config['max_size'] = '500';
        > > $this->load->library('upload', $config);
        > >
        > > if ( ! $this->upload->do_upload()){
        > > $error = array('error' => $this->upload->display_errors());
        > > $this->load->view('upload_gagal', $error);
        > > }
        > > else{
        > > $this->d = $this->upload->data();
        > > $this->ModelSubmenu->upload_file($this->input->post('id'));
        > >
        > > redirect('adm_product/view_product/'.$this->input->post('idsub'));
        > > }
        > > }
        > > //SELESAI
        > >
        > > yang keluar hasil gini mulu:
        > > The filetype you are attempting to upload is not allowed.
        >
        >
        >



        --
        Putra Prima A
        0410630078 Teknik Elektro Brawijaya
        3 ipa 2 smunsa 2004
        http://siubie.web.id/


        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.