Welcome Guest, Not a member yet? Register   Sign In
getting error : The upload path does not appear to be valid.
#1

[eluser]Unknown[/eluser]
I'm getting the The upload path does not appear to be valid. error while trying to implement below code.
My Controller code is:
Code:
$this->load->helper(array('form', 'url'));

        $this->load->library(array('form_validation','upload'));
        
            $config['upload_path'] = './photos/';
        $config['allowed_types'] = 'gif|jpg|png';
        $config['max_size']    = '100';
        $config['max_width']  = '1024';
        $config['max_height']  = '768';

        $this->load->library('upload', $config);

        if ( ! $this->upload->do_upload())
        {
            $error = array('error' => $this->upload->display_errors());

            $this->load->view('addvideo', $error);
        }
        else
        {
            $data = array('upload_data' => $this->upload->data());

            $this->load->view('addvideo', $data);
        }

View code is :

Code:
<html>
<head>
<title>Upload Form</title>
</head>
<body>

<?php echo $error;?>

<?php echo form_open_multipart('homemanagement/uploadVideo');?>

<input type="file" name="userfile" size="20" />

<br /><br />

&lt;input type="submit" value="upload" /&gt;

&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;




Theme © iAndrew 2016 - Forum software by © MyBB