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


PHP AIOWPSecurity_Utility_File::recursive_file_search方法代码示例

本文整理汇总了PHP中AIOWPSecurity_Utility_File::recursive_file_search方法的典型用法代码示例。如果您正苦于以下问题:PHP AIOWPSecurity_Utility_File::recursive_file_search方法的具体用法?PHP AIOWPSecurity_Utility_File::recursive_file_search怎么用?PHP AIOWPSecurity_Utility_File::recursive_file_search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AIOWPSecurity_Utility_File的用法示例。


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

示例1: recursive_file_search

 static function recursive_file_search($pattern = '*', $flags = 0, $path = '')
 {
     $paths = glob($path . '*', GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT);
     if ($paths === FALSE) {
         return FALSE;
     }
     $files = glob($path . $pattern, $flags);
     if ($files === FALSE) {
         return FALSE;
     }
     foreach ($paths as $path) {
         $files = array_merge($files, AIOWPSecurity_Utility_File::recursive_file_search($pattern, $flags, $path));
     }
     return $files;
 }
开发者ID:roycocup,项目名称:enclothed,代码行数:15,代码来源:wp-security-utility-file.php

示例2: render_tab4

    function render_tab4()
    {
        global $aio_wp_security;
        if (isset($_POST['aiowps_system_log_file'])) {
            if ($_POST['aiowps_system_log_file'] != NULL) {
                $sys_log_file = sanitize_text_field($_POST['aiowps_system_log_file']);
                $aio_wp_security->configs->set_value('aiowps_system_log_file', $sys_log_file);
            } else {
                $sys_log_file = 'error_log';
                $aio_wp_security->configs->set_value('aiowps_system_log_file', $sys_log_file);
            }
            $aio_wp_security->configs->save_config();
        } else {
            $sys_log_file = $aio_wp_security->configs->get_value('aiowps_system_log_file');
        }
        ?>
        <h2><?php 
        _e('System Logs', 'aiowpsecurity');
        ?>
</h2>
        <div class="aio_blue_box">
            <?php 
        echo '<p>' . __('Sometimes your hosting platform will produce error or warning logs in a file called "error_log".', 'aiowpsecurity') . '
            <br />' . __('Depending on the nature and cause of the error or warning, your hosting server can create multiple instances of this file in numerous directory locations of your WordPress installation.', 'aiowpsecurity') . '
            <br />' . __('By occassionally viewing the contents of these logs files you can keep informed of any underlying problems on your system which you might need to address.', 'aiowpsecurity') . '
            </p>';
        ?>
        </div>

        <div class="postbox">
        <h3><label for="title"><?php 
        _e('View System Logs', 'aiowpsecurity');
        ?>
</label></h3>
        <div class="inside">
            <p>Please click the button below to view the latest system logs:</p>
            <form action="" method="POST">
                <?php 
        wp_nonce_field('aiowpsec-view-system-logs-nonce');
        ?>
                <div><?php 
        _e('Enter System Log File Name', 'aiowpsecurity');
        ?>
:
                <input type="text" size="25" name="aiowps_system_log_file" value="<?php 
        echo sanitize_text_field($sys_log_file);
        ?>
" />
                <span class="description"><?php 
        _e('Enter your system log file name. (Defaults to error_log)', 'aiowpsecurity');
        ?>
</span>
                </div>
                <div class="aio_spacer_15"></div>
                <input type="submit" name="aiowps_search_error_files" value="<?php 
        _e('View Latest System Logs', 'aiowpsecurity');
        ?>
" class="button-primary search-error-files" />
                <span class="aiowps_loading_1">
                    <img src="<?php 
        echo AIO_WP_SECURITY_URL . '/images/loading.gif';
        ?>
" alt="<?php 
        __('Loading...', 'aiowpsecurity');
        ?>
" />
                </span>            
            </form>
        </div></div>
    <?php 
        if (isset($_POST['aiowps_search_error_files'])) {
            $nonce = $_REQUEST['_wpnonce'];
            if (!wp_verify_nonce($nonce, 'aiowpsec-view-system-logs-nonce')) {
                $aio_wp_security->debug_logger->log_debug("Nonce check failed on view system log operation!", 4);
                die("Nonce check failed on view system log operation!");
            }
            $logResults = AIOWPSecurity_Utility_File::recursive_file_search($sys_log_file, 0, ABSPATH);
            if (empty($logResults) || $logResults == NULL || $logResults == '' || $logResults === FALSE) {
                $this->show_msg_updated(__('No system logs were found!', 'aiowpsecurity'));
            } else {
                foreach ($logResults as $file) {
                    $this->display_system_logs_in_table($file);
                }
            }
        }
    }
开发者ID:Rudchyk,项目名称:wp-framework,代码行数:86,代码来源:wp-security-filesystem-menu.php


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