terça-feira, 25 de outubro de 2016

Erro no Imagecrud

Para resolver erro de uload de imagem quando existe uma subpasta nos controllers do codeigniter:



protected function _get_delete_url($value)
    {

       
        $rsegments_array = $this->ci->uri->rsegment_array();
        $segments_array = $this->ci->uri->segment_array();
        $rsegments_array[1] = $segments_array[1].'/'.$segments_array[2];
         return site_url($rsegments_array[1].'/'.$rsegments_array[2].'/delete_file/'.$value);
    }






    protected function getState()
    {
        $rsegments_array = $this->ci->uri->rsegment_array();
        $segments_array = $this->ci->uri->segment_array();
        $rsegments_array[1] = $segments_array[1].'/'.$segments_array[2];
 

(c)2009 Felipe Govoni.