You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a default kohana 3.3.1 and does not work properly FTP class.
Fixed names of classes and files from Storage_Connection_FTP to Storage_Connection_Ftp and helped. Perhaps only in my case but it was required. :)
BTW: Another litle problem with class Kohana_Storage_Connection_Ftp . Wront information about files.
So i change the function :
protected function _listing($path, $listing)
{
$this->_load();
Use:
$ftp = Storage::factory('ftp', array('username' => 'username', 'password' => 'password));
$files = $ftp->listing('/files');
if (isset($files) && !empty($files)) {
foreach ($files as $listing) {
if ($listing->is_file()) {
echo $listing->name(). " | ". $listing->modified(). " | ". $listing->mime(). " | ". $listing->size(). " ";
} else if ($listing->is_directory()) {
// We can also iterate over this $listing object because it is an
// instance of Storage_Directory
echo $listing->name();
}
}
}
So it's all :P
The text was updated successfully, but these errors were encountered:
I have a default kohana 3.3.1 and does not work properly FTP class.
Fixed names of classes and files from Storage_Connection_FTP to Storage_Connection_Ftp and helped. Perhaps only in my case but it was required. :)
BTW: Another litle problem with class Kohana_Storage_Connection_Ftp . Wront information about files.
So i change the function :
protected function _listing($path, $listing)
{
$this->_load();
Use:
$ftp = Storage::factory('ftp', array('username' => 'username', 'password' => 'password));
$files = $ftp->listing('/files');
if (isset($files) && !empty($files)) {
foreach ($files as $listing) {
if ($listing->is_file()) {
echo $listing->name(). " | ". $listing->modified(). " | ". $listing->mime(). " | ". $listing->size(). "
";
} else if ($listing->is_directory()) {
// We can also iterate over this
$listing
object because it is an// instance of
Storage_Directory
echo $listing->name();
}
}
}
So it's all :P
The text was updated successfully, but these errors were encountered: