Welcome Guest, Not a member yet? Register   Sign In
image upload problem
#1

[eluser]alexaaaaaaaaaa[/eluser]
hi i need some help with my image upload here's my controller

Code:
if(isset($submit))
                        {
                        $data = array();
                            $config['upload_path'] = '.images/';
                            $config['allowed_types'] = 'gif|jpg|png|bmp|jpeg';
                            $config['max_size']    = '0';
                            $config['max_width']  = '0';
                            $config['max_height']  = '0';
                            $this->load->library('upload', $config);

                
                            if ($this->upload->do_upload('logo'))
                            {
                                $data = $this->upload->data();
                                $logo = $data['file_name'];
                            }else
                            {
                                $logo = $data['file_name'];
                            }
                            
                            if ($this->upload->do_upload('peta'))
                            {
                                $data = $this->upload->data();
                                $peta = $data['file_name'];
                            }else
                            {
                                $peta = $data['file_name'];;
                            }

Thanks in advance
#2

[eluser]Benito[/eluser]
Help in what? If you specify what your problem is and what you want to achieve, maybe there is a bigger chance that the community can help.
#3

[eluser]alexaaaaaaaaaa[/eluser]
[quote author="Benito" date="1280439650"]Help in what? If you specify what your problem is and what you want to achieve, maybe there is a bigger chance that the community can help.[/quote]
my problem is simple it doesn't upload the picture and it doesn't insert the file_name into database ... and i have upload a script and it says that my dir is not writable but i have CHMOD to 777 and my server says command not understood .. i don't know what to do..
#4

[eluser]ELRafael[/eluser]
Code:
$config['upload_path'] = '.images/';

Try to change to
Code:
$config['upload_path'] = './images/';

and try to use
Code:
$this->upload->display_errors()
to show the errors messages.




Theme © iAndrew 2016 - Forum software by © MyBB