• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_filenames函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: _remap

 function _remap($module, $segs = NULL)
 {
     $remote_ips = $this->fuel->config('webhook_remote_ip');
     $is_web_hook = $this->fuel->auth->check_valid_ip($remote_ips);
     // check if it is CLI or a web hook otherwise we need to validate
     $validate = (php_sapi_name() == 'cli' or defined('STDIN') or $is_web_hook) ? FALSE : TRUE;
     // Only super admins can execute builds for now
     if ($validate and !$this->fuel->auth->is_super_admin()) {
         show_error(lang('error_no_access'));
     }
     // call before build hook
     $params = array('module' => $module);
     $GLOBALS['EXT']->_call_hook('before_build', $params);
     // get the type of build which can either be CSS or JS
     $type = array_shift($segs);
     $valid_types = array('css', 'js');
     if (!empty($type) and in_array($type, $valid_types)) {
         $this->load->helper('file');
         // get the folder name if it exists
         $segs_str = implode('/', $segs);
         // explode on colon to separate the folder name from the file name
         $seg_parts = explode(':', $segs_str);
         // set the folder name to lookin
         $folder = $seg_parts[0];
         // set the file name if one exists
         $filename = !empty($seg_parts[1]) ? $seg_parts[1] : 'main.min';
         // get list of files
         $files_path = assets_server_path($folder, $type);
         $_files = get_filenames($files_path, TRUE);
         $files = array();
         foreach ($_files as $file) {
             // trim to normalize path
             $replace = trim(assets_server_path('', $type), '/');
             $files[] = str_replace($replace, '', trim($file, '/'));
         }
         $output_params['type'] = $type;
         $output_params['whitespace'] = TRUE;
         $output_params['destination'] = assets_server_path($filename . '.' . $type, $type, $module);
         $output = $this->asset->optimize($files, $output_params);
         echo lang('module_build_asset', strtoupper($type), $output_params['destination']);
     } else {
         if ($module != 'index' and $this->fuel->modules->exists($module) and $this->fuel->modules->is_advanced($this->fuel->{$module})) {
             $results = $this->fuel->{$module}->build();
             if ($results === FALSE) {
                 echo lang('error_no_build');
             }
         } else {
             // run default FUEL optimizations if no module is passed
             $this->optimize_js();
             $this->optimize_css();
         }
     }
     // call after build hook
     $GLOBALS['EXT']->_call_hook('after_build', $params);
 }
开发者ID:huayuxian,项目名称:FUEL-CMS,代码行数:55,代码来源:build.php


示例17: delete_dir

 /**
  * media::delete_dir()
  * 
  * @param mixed $valor
  * @return
  */
 function delete_dir($valor)
 {
     if ($this->session->userdata('logged_in')) {
         if (count(get_filenames('./upload/' . $valor)) >= 1) {
             redirect('Media');
         } else {
             rmdir("./upload/" . $valor) or die("erro ao apagar diretório");
             redirect('Media');
         }
     }
 }
开发者ID:GregMaus,项目名称:Sistema,代码行数:17,代码来源:media.php


示例18: editPage

 public function editPage()
 {
     Admincontrol_helper::is_logged_in($this->session->userdata('userName'));
     //Load the form helper
     $this->load->helper('form');
     //Get page details from database
     $this->data['pages'] = $this->Hoosk_model->getPage($this->uri->segment(4));
     //Load the view
     $this->data['templates'] = get_filenames('theme/' . THEME . '/templates');
     $this->data['header'] = $this->load->view('admin/header', $this->data, true);
     $this->data['footer'] = $this->load->view('admin/footer', '', true);
     $this->load->view('admin/editpage', $this->data);
 }
开发者ID:Krucamper,项目名称:Hoosk,代码行数:13,代码来源:Pages.php


示例19: index

 /**
  * Mostra la vista para subir las fotos
  * 
  * @return view 
  */
 public function index()
 {
     // Aquí tienes que obtener la cantidad y datos de las
     // fotos desde tu base de datos
     $this->load->helper('file');
     $fotos = get_filenames('./img/mini/');
     $cantidad_fotos = count($fotos);
     $data['fotos_restantes'] = 6 - $cantidad_fotos;
     $data['fotos'] = $fotos;
     $this->load->view('frontend/menu_vista', $data);
     $this->load->view('backend/cargar_fotos_vista');
     $this->load->view('frontend/footer_vista');
 }
开发者ID:doncarlosdiaz,项目名称:luxuss,代码行数:18,代码来源:Fotos.php


示例20: get_filenames

function get_filenames($source_dir, $include_path = FALSE)
{
    static $_filedata = array();
    if ($fp = @opendir($source_dir)) {
        while (FALSE !== ($file = readdir($fp))) {
            if (@is_dir($source_dir . $file) && substr($file, 0, 1) != '.') {
                get_filenames($source_dir . $file . "/", $include_path);
            } elseif (substr($file, 0, 1) != ".") {
                $_filedata[] = $include_path == TRUE ? $source_dir . $file : $file;
            }
        }
        return $_filedata;
    }
}
开发者ID:TheYorkerArchive,项目名称:codebase-2006-2012,代码行数:14,代码来源:file_helper.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_files函数代码示例发布时间:2022-05-15
下一篇:
PHP get_filename_id函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap