[eluser]zen333[/eluser]
Hi Guys,
Many thanks for all your feedbacks. I will try them one by one.
Hi Yorick,
I have some errors running the codes that you gave me!? could you help me solve them. THanks.
A PHP Error was encountered
Severity: Warning
Message: chmod() [function.chmod]: No error
Filename: controllers/test.php
Line Number: 14
A PHP Error was encountered
Severity: Warning
Message: mkdir() [function.mkdir]: No such file or directory
Filename: controllers/test.php
Line Number: 17
THank you. Also I been trying to learn the example in CI on the "file uploading class"
[code]<?php
class Upload extends Controller {
function Upload()
{
parent::Controller();
$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'] = '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('upload_form', $error);
}
else
{
$data = array('upload_data' => $this->upload->data());
$this->load->view('upload_success', $data);
}
}
}
?>[code]
I think it due to configuration problem that I keep on receiving a error "The upload path does not appear to be valid" ??? I try to change the code such as "$config['upload_path'] = './uploads/';" to "$config['upload_path'] = 'C:\Documents and Settings\zen\Desktop\test\uploads';" but still can't solve the problem.
Every single line of codes are the same as in CI example.....Could someone please enlighten me? Thank you so much!
Regards,
Zen