[eluser]eabihaydar[/eluser]
I am having this problem with my upload page:
404 Page Not Found
The page you requested was not found.
Controller Code:
Code:
<?php
class Gallery extends Controller {
function __construct()
{
parent::Controller();
$this->load->helper(array('form', 'url'));
}
function index()
{
$this->load->library('upload');
$this->load->view('ulpoad_photo');
}
function do_upload()
{
$config['upload_path'] = './uploads/';
$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->gallery->do_upload())
{
$error = array('error' => $this->upload->display_errors());
$this->load->view('ulpoad_photo', $error);
}
else
{
$data = array('ulpoad_data' => $this->upload->data());
$this->load->view('upload_success', $data);
}
}
}?>
View Code:
Code:
<html>
<head>
<title>Upload Photo</title>
</head>
<body>
<?php echo form_open_multipart('upload/do_upload');?>
<input type="file" name="userfile" size="20" />
<br /><br />
<input type="submit" value="upload" />
</form>
</body>
</html>
Please Help.
Many Thanks