harishanchu / Laravel-FTP

A simple Laravel 4/5/6/7 ftp service provider with basic ftp methods.
220 stars 87 forks source link

Class FTP not found #3

Closed vrijdrogenaam closed 10 years ago

vrijdrogenaam commented 10 years ago

Hello, this package works great with eg the size method or the create_dir method, but when I try to upload a file to my FTP server, it returns an error saying "Class 'FTP' not found". Does anyone know what the problem might be here? Thanks

my code:

$name=Input::get('name');
$file=Input::file('file');
$tmp_path=$file->getRealPath();
$file_ext=$file->getClientOriginalExtension();

$new_file_name=$name.".".$file_ext;
$new_path="tasks/".$name."/new/".$new_file_name;
$upload=FTP::connection()->uploadFile($tmp_path,$new_path);

if($upload){
    return "file was uploaded";
}
stevenklar commented 10 years ago

Did you tried "Ftp" instead of "FTP" also?

harishanchu commented 10 years ago

Looks like a typo. You should use "Ftp" instead of "FTP". I assume your issue is resolved and I am closing this for now. Feel free to reopen if it didn't help you.