• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i can`t upload file to server

I am writing a module. When i used class upload which can`t upload file to server. In order to i used move_upload_file() that it process success.
Message Error is the path is not valiable

Did you set the right permissions for the upload folder?
Should be set to 777.
Maybe the directory is not writable. Hard to say whats wrong
with your script. Some code of your application would be
usefull to help you.

Did you read the user guide section (file uploading class):

no, i am using windows xp.
But i use move_upload_file is successful. But i don`t know why ?

It's impossible to help you without having a look at the
script responsible for uploading the file and maybe the
directories you dit set up at your root (or where ever) to
load the files in.

Quote:When i used class upload which can`t upload file to server.

I would recommend to read the CI user guide and follow the
instructions step by step, because the
upload class IS definitely able to upload files!
Don't give up too early! It wouldn't make much sense to
use a framework like codeigniter if you don't want use the
provided libraries (of course you still can).

this is my code.
$config['upload_path'] = $path;
$config['allowed_types'] = 'gif|jpg|png|bmp';
$config['max_size'] = '10000';
$config['max_width'] = '1024';
$config['max_height'] = '768';

$this->load->library('upload', $config);
echo $this->upload->display_errors();
My link http://localhost/code/index.php/upload/
my root C:\AppServ\www\code
In dir Code directory
i created uploads directory
But this code displayed errors
The upload path does not appear to be valid.
I don`t know why ?
Please help me !

Delete the /uploads/ folder. Run the script again, then see whether it is creating that folder or not. If not, that is your first problem.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.