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

#1
[eluser]minhbu[/eluser]
hey
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.
Help
Message Error is the path is not valiable

#2
[eluser]LuckyFella73[/eluser]
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):
http://ellislab.com/codeigniter/user-gui...ading.html

#3
[eluser]minhbu[/eluser]
no, i am using windows xp.
But i use move_upload_file is successful. But i don`t know why ?

#4
[eluser]LuckyFella73[/eluser]
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).

#5
[eluser]minhbu[/eluser]
this is my code.
Quote:$path='./uploads/';
if(!is_dir($path))
mkdir($path);
$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);
if(!$this->upload->do_upload())
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 !

#6
[eluser]jbads[/eluser]
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-2019 MyBB Group.