简体   繁体   中英

uploading file via ftp using codeigniter but showing error message

i am trying to upload file using ftp class of codeigniter, but it is showing me:

"Unable to upload the specified file. Please check your path."

and in filezilla log i am getting: "550 Filename Invalid."

Please have a look on my code below and help me out to solve this issue.. i am usign xampp as my local server and filezilla as my ftp server on my local machine..

 $this->ftp->upload($_FILES['book_file']['tmp_name'], 
 'E:\\Software\\xampp-win32-1.8.2-2-VC9\\xampp\\htdocs\\international\\public\\books\\' . $_FILES['book_file']['name'],
 'ascii', 0775);

as suggested by @KollleY i have changed my code in this way:

 $this->ftp->upload($_FILES['book_file']['tmp_name'], 
 'ftp://localhost/' . $_FILES['book_file']['name'], 
 'ascii', 0775);

but again i am getting the same error:

"Unable to upload the specified file. Please check your path."

while i can see all my files at ftp://localhost/ using my web browser..

您尝试从光盘中获取文件,但实际上,FTP应该为您提供以ftp://开头的名称

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM