[eluser]adekenny[/eluser]
Hi,
I'm using codeigniter for a project that requires that users upload their photos after completing an online form. The code worked perfectly on my local system (developement system) but didn't work online on my hosting company's server.
I keep getting this message
"The upload path does not appear to be valid".
Please see my controller code
<?php
class Upload extends Controller {
function __construct()
{
parent::__construct();
$this->load->helper(array('form', 'url'));
}
function index()
{
$this->load->view('upload_form', array('error' => ' ' ));
}
function do_upload()
{
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '50';
$config['max_width'] = '900';
$config['max_height'] = '600';
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
$this->load->view('upload_form', $error);
}
else
{
$data = array('upload_data' => $this->upload->data());
$this->load->view('upload_success', $data);
}
}
}
?>
I have already created a folder called "uploads" in my Public_html folder which is the web root folder but couldn't just get it to work online.
What could be the problem pleaseeeeeeeeee? How do i determine the correct upload path on my remote web server.
Thanks
kenny