Welcome Guest, Not a member yet? Register   Sign In
problem with image after upload , dosent display

Hi guys
I`m having problem with showing image after it upload successfully , on local host everything works fine , but when i upload my code to test it online i`m facing this problem .
after my upload image or delete image success i set flash data for message and redirect with refresh method to show the image or place holder if its empty. (as i said it working like charm on local) But on server it needs several refreshesh or even ctrl F5 for image to take place .
controller :
public function do_upload(){
        $userid = $this->session->userdata('user_id');
        $result = parent::zz('./img/userprofilepix',TRUE);
        if($result[1] == 'error') {
                $this->session->set_flashdata('error', $result[0]);
                } else {
                $data['img'] = $result ;
                $this->ion_auth->update($userid, $data) ;
                '<div class="alert alert-success"><i class="icon-info-sign"></i>user pix has been saved </div>');
                redirect('admin/users/profile' , 'refresh');

View :
   <?php if($user->img == ''){ ?>
      <img class="centerized saye" src="<?= base_url()?>/public/img/icons/avator.jpg"><img />
   <?php } else { ?>
      <img class="centerized saye" src="<?= base_url()?>/img/userprofilepix/thumb/<?= $user->img; ?>"><img />
   <?php } ?>

Messages In This Thread
problem with image after upload , dosent display - by shariaty - 01-11-2015, 10:01 AM

Theme © iAndrew 2016 - Forum software by © MyBB