当前位置: 首页>>代码示例>>PHP>>正文


PHP get_filenames函数代码示例

本文整理汇总了PHP中get_filenames函数的典型用法代码示例。如果您正苦于以下问题:PHP get_filenames函数的具体用法?PHP get_filenames怎么用?PHP get_filenames使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_filenames函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 public function index()
 {
     $this->load->helper('file');
     // Log Files
     Template::set('logs', get_filenames($this->config->item('log_path')));
     Template::render();
 }
开发者ID:hnmurugan,项目名称:Bonfire,代码行数:7,代码来源:developer.php

示例2: index

 function index()
 {
     $get_profile_image = $this->students_model->get_student_profile_image_by_student_id($this->session->userdata('student_id'));
     if ($get_profile_image != NULL) {
         foreach ($get_profile_image as $row_i) {
             $existing_image_file_name = $row_i->file_name;
         }
         $profile_file_names = get_filenames("profiles");
         foreach ($profile_file_names as $file) {
             $same = $this->same_file($existing_image_file_name, $file);
             if ($same) {
                 $file_path = "profiles/" . $file;
                 unlink($file_path);
             }
         }
         $delete_current_profile_image = $this->students_model->delete_student_profile_image_by_student_id($this->session->userdata('student_id'));
     }
     //insert student profile image
     $get_student = $this->global_model->get_by_id("students", $this->session->userdata('student_id'));
     foreach ($get_student as $row) {
         $image_file_name = $row->first_name . "_" . $row->last_name;
     }
     $this->load->library('upload');
     $this->upload->initialize(array("upload_path" => "profiles", "allowed_types" => "gif|jpg|png", "max_width" => "5000", "max_height" => "8000"));
     if ($this->upload->do_upload('profile_pic')) {
         $data = $this->upload->data();
         $data['student_id'] = $this->session->userdata('student_id');
         $insert_profile_image = $this->global_model->add("profile_image", $data);
         $data['status'] = true;
     } else {
         $data['status'] = false;
     }
     echo json_encode($data);
 }
开发者ID:mkrdip,项目名称:information,代码行数:34,代码来源:upload.php

示例3: _get_callback_data

 function _get_callback_data($request_data, $response_data, $return_data, $form_certi, $stream_id)
 {
     //回调
     $form_certi = $this->certi_model->findByAttributes(array('certi_name' => $form_certi));
     //请求方
     $callback_list = array();
     $request_data = mb_unserialize($request_data);
     $method_name = str_replace('.', '_', $request_data['method']);
     $node_type = $request_data['node_type'] == 'ecos.b2c' ? 'erp_to_ec' : 'ec_to_erp';
     $filenames = get_filenames('application/libraries/apiv/' . $node_type);
     foreach ($filenames as $key2 => $value2) {
         if ($method_name . '.php' == $value2) {
             $this->load->library('apiv/' . $node_type . '/' . $method_name);
             if (method_exists($this->{$method_name}, 'callback')) {
                 //发送回调
                 $callback_rs = $this->{$method_name}->callback(array('request_data' => $request_data, 'return_data' => $return_data, 'response_data' => $response_data, 'msg_id' => md5($stream_id)));
                 $now = time();
                 $callback_data = $callback_rs['callback_data'];
                 $callback_url = $callback_rs['callback_url'];
                 $callback_data['matrix_certi'] = $form_certi['certi_name'];
                 $callback_data['matrix_timestamp'] = $now;
                 $callback_data['sign'] = md5($form_certi['certi_name'] . $form_certi['certi_key'] . $now);
                 $callback_data['stream_id'] = $stream_id;
                 //$return_callback = $this->httpclient->set_timeout(15)->post($rs['callback_url'],$callback_data);//回调发送
                 $callback_list = array('url' => $callback_url, 'method' => 'POST', 'post_data' => $callback_data, 'header' => null, 'options' => array());
             }
         }
     }
     return $callback_list;
 }
开发者ID:xingfuunit,项目名称:matrix,代码行数:30,代码来源:crontab_stream.php

示例4: getReadme

 /**
  * Given a directory, return the filename of any readme file if it exists
  * @param string $dir The directory to search
  * @return mixed A filename if found, bool false if not
  */
 public static function getReadme($dir)
 {
     $CI =& get_instance();
     $dir = rtrim($dir, '/') . '/';
     $CI->load->helper('file');
     $files = get_filenames($dir);
     $readme = FALSE;
     $file = '';
     foreach ($files as $f) {
         $lfile = strtolower($f);
         if (strpos($lfile, 'readme') === 0) {
             $readme = TRUE;
             $file = $f;
             break;
         }
     }
     if (!$readme) {
         return FALSE;
     }
     # Let's not get hosed by some guy with a 10GB README
     $max_size = 1024 * 256;
     # 256 kb
     if (filesize($dir . $file) > $max_size) {
         return FALSE;
     } else {
         return $file;
     }
 }
开发者ID:souparno,项目名称:getsparks.org,代码行数:33,代码来源:spark_helper.php

示例5: get_last_filename

function get_last_filename()
{
    $filenames = get_filenames();
    $last_filename = end($filenames);
    reset($filenames);
    return $last_filename;
}
开发者ID:epiii,项目名称:aros,代码行数:7,代码来源:react-webcam.php

示例6: ListFiles

 private function ListFiles()
 {
     $sess = $this->session->userdata('user_data');
     $basepath = BASEPATH . '../uploads/slider';
     $files = get_filenames($basepath);
     echo json_encode($files);
 }
开发者ID:juliusce,项目名称:berkatsouvenir,代码行数:7,代码来源:Upload.php

示例7: index

 public function index()
 {
     $this->load->helper('file');
     Assets::add_js($this->load->view('developer/logs_js', null, true), 'inline');
     // Log Files
     Template::set('logs', get_filenames($this->config->item('log_path')));
     Template::render();
 }
开发者ID:nurulimamnotes,项目名称:Bonfire,代码行数:8,代码来源:developer.php

示例8: ListFiles

 private function ListFiles()
 {
     $sess = $this->session->userdata('user_data');
     $nomor_efornas = $this->session->userdata('nomor_efornas');
     $basepath = BASEPATH . '../uploads/' . $sess['id_provinsi'] . $sess['id_kabkota'] . $sess['id_faskes'] . '/' . $nomor_efornas['no'];
     $files = get_filenames($basepath);
     echo json_encode($files);
 }
开发者ID:Quallcode,项目名称:forkes,代码行数:8,代码来源:Upload.php

示例9: get_language

 public function get_language()
 {
     $this->load->helper('file');
     $result = get_filenames('assets/nocms/languages');
     for ($i = 0; $i < count($result); $i++) {
         $result[$i] = str_ireplace('.php', '', $result[$i]);
     }
     return $result;
 }
开发者ID:remoharsono,项目名称:No-CMS,代码行数:9,代码来源:language_model.php

示例10: get_images

 public function get_images()
 {
     $files = get_filenames('uploads/wysiwyg/thumbnails');
     $return = [];
     foreach ($files as $file) {
         $return[] = array('thumb' => base_url('uploads/wysiwyg/thumbnails/' . $file), 'image' => base_url('uploads/wysiwyg/images/' . $file));
     }
     echo stripslashes(json_encode($return));
 }
开发者ID:lekhangyahoo,项目名称:gonline,代码行数:9,代码来源:AdminWysiwyg.php

示例11: view

 public function view($page = 'overview')
 {
     if (!file_exists(APPPATH . '/views/pages/' . $page . '.php')) {
         show_404();
     }
     $data['title'] = ucfirst($page);
     $data['api_key'] = $this->session->api_key;
     $data['api_url'] = Bitcodin::getBaseUrl();
     if (!isset($this->session->page_limit) or !is_numeric($this->session->page_limit)) {
         $this->session->page_limit = 10;
     }
     $data['page_limit'] = $this->session->page_limit;
     $page_files = get_filenames(APPPATH . '/views/pages');
     $menu_items = array();
     foreach ($page_files as $file) {
         $name = basename($file, '.php');
         $menu_items[] = ucfirst($name);
     }
     $index = array_search('Home', $menu_items);
     $home = $menu_items[$index];
     unset($menu_items[$index]);
     array_unshift($menu_items, $home);
     if ($page == 'overview') {
         Bitcodin::setApiToken($this->session->api_key);
         try {
             $encodingProfiles = EncodingProfile::getListAll();
             if (count($encodingProfiles) <= 0) {
                 $encProf = new \stdClass();
                 $encProf->encodingProfileId = 0;
                 $encProf->name = "No encoding profile available";
                 $encodingProfiles = array("No encoding profiles found");
             }
             $outputs = Output::getListAll();
             if (count($outputs) <= 0) {
                 $output = new \stdClass();
                 $output->outputId = 0;
                 $output->name = "No output available";
                 $outputs = array($output);
             }
         } catch (BitcodinException $ex) {
             $output = new \stdClass();
             $output->outputId = 0;
             $output->name = "No output available";
             $outputs = array($output);
             $encProf = new \stdClass();
             $encProf->encodingProfileId = 0;
             $encProf->name = "No encoding profile available";
             $encodingProfiles = array($encProf);
         }
         $data['encodingProfiles'] = $encodingProfiles;
         $data['outputs'] = $outputs;
     }
     $data['menu_items'] = $menu_items;
     $this->load->view('templates/header', $data);
     $this->load->view('pages/' . $page, $data);
     $this->load->view('templates/footer', $data);
 }
开发者ID:EQ4,项目名称:bitlive-admin,代码行数:57,代码来源:Pages_ctrl.php

示例12: get_file_list

 private function get_file_list($root_directory, $target_directory)
 {
     $file_list = array();
     $directory = $root_directory . '/' . $target_directory;
     $file_list_bak = get_filenames($directory);
     foreach ($file_list_bak as $file) {
         array_push($file_list, '/' . $directory . '/' . $file);
     }
     return $file_list;
 }
开发者ID:w1tch,项目名称:Gallery,代码行数:10,代码来源:gallery.php

示例13: index

 /**
  * Index file that is home page for documentation
  * @return view index view
  */
 public function index()
 {
     $this->load->helper('file');
     $files = get_filenames('./application/views/documentation');
     $articles = $this->format_list($files);
     $this->load->view('dashboard/header.php', array('title' => 'ISU Lacrosse Dashboard'));
     $this->load->view('dashboard/sidebar.php', array('active' => 'documentation', 'records' => $this->get_records()));
     $this->load->view('documentation/index.php', array('articles' => $articles));
     $this->load->view('dashboard/footer.php', array('custom_script' => 'cms_index'));
 }
开发者ID:andreamswick,项目名称:ilstulacrosse,代码行数:14,代码来源:documentation.php

示例14: info

 public function info()
 {
     $files = get_filenames($this->folder, FALSE);
     if ($files) {
         $data = array('titulo' => 'Mis Consultas', 'datos' => $this->consulta_model->get_datos(), 'files' => $files);
     } else {
         $data = array('titulo' => 'Mis Consultas', 'datos' => $this->consulta_model->get_datos(), 'files' => $NULL);
     }
     $this->load->view('consulta_view', $data);
 }
开发者ID:minamagdy666,项目名称:uploadCI,代码行数:10,代码来源:files.php

示例15: __construct

 function __construct()
 {
     parent::__construct();
     $this->load->helper('file');
     foreach (array('controllers', 'services', 'filters', 'directives') as $path) {
         foreach (get_filenames('app/scripts/' . $path) as $script) {
             $this->all[$path][] = $script;
         }
     }
 }
开发者ID:NaszvadiG,项目名称:generator-codeigniter,代码行数:10,代码来源:scripts.php


注:本文中的get_filenames函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。