Welcome Guest, Not a member yet? Register   Sign In
Having problem with CodeIgniter FTP class
#1

[eluser]Anthony Hull[/eluser]
Hey guys,

I wonder if you can help.

Basically, my CI script seems to be working fine when uploading to /public_html/ on a remote server, but when I try to upload to a subfolder like /public_html/folder, it creates the subfolder but doesn't upload any files inside it. But it uploads files fine to the /public_html/ folder.

Here is some code I have currently:

$_POST['remote_path'] has a value such as "/public_html/" or "/public_html/subfolder_name"


Code:
$local_path='/home/rmrs/public_html/members/uploader/files/'. $download_folder . '/';
            
// Creates a folder
$this->ftp->mkdir($_POST['remote_path'])
// Uploads folder
$this->ftp->mirror($local_path, $_POST['remote_path']);


Thanks guys!

Anthony
#2

[eluser]Anthony Hull[/eluser]
I found out why it wasn't working.. I need to have a forward slash "/" after the subfolder name.

so, public_html/subfolder won't work but public_html/subfolder/ does work.

Smile




Theme © iAndrew 2016 - Forum software by © MyBB