Exemplo n.º 1
0
 function get_ds_file_path(&$server_data)
 {
     $CI =& get_instance();
     $CI->load->helper('string');
     switch (get_file_protocol($server_data)) {
         case 'ftp':
             $dir = reduce_double_slashes($server_data['ftp_path'] . '/' . $server_data['dir'] . '/');
             break;
         case 'sftp':
             $dir = reduce_double_slashes($server_data['ssh_path'] . '/' . $server_data['dir'] . '/');
             break;
         case 'gdaemon':
             $dir = reduce_double_slashes($server_data['script_path'] . '/' . $server_data['dir'] . '/');
             break;
         case 'local':
             $dir = reduce_double_slashes($server_data['script_path'] . '/' . $server_data['dir'] . '/');
             break;
         default:
             $dir = '/';
             break;
     }
     return $dir;
 }
Exemplo n.º 2
0
 private function _get_file_protocol($server = array())
 {
     return get_file_protocol($server);
 }