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


PHP AIOWPSecurity_Utility_File::is_file_permission_secure方法代码示例

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


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

示例1: show_wp_filesystem_permission_status

 function show_wp_filesystem_permission_status($name, $path, $recommended)
 {
     $fix = false;
     $configmod = AIOWPSecurity_Utility_File::get_file_permission($path);
     if ($configmod == "0777") {
         $trclass = "aio_table_row_red";
         //Display a red background if permissions are set as least secure ("777")
         $fix = true;
     } else {
         if ($configmod != $recommended) {
             //$res = $this->is_file_permission_secure($recommended, $configmod);
             $res = AIOWPSecurity_Utility_File::is_file_permission_secure($recommended, $configmod);
             if ($res) {
                 $trclass = "aio_table_row_green";
                 //If the current permissions are even tighter than recommended then display a green row
                 $fix = true;
             } else {
                 $trclass = "aio_table_row_yellow";
                 //Display a yellow background if permissions are set to something different than recommended
                 $fix = true;
             }
         } else {
             $trclass = "aio_table_row_green";
         }
     }
     echo "<tr class=" . $trclass . ">";
     echo '<td>' . $name . "</td>";
     echo '<td>' . $path . "</td>";
     echo '<td>' . $configmod . '</td>';
     echo '<td>' . $recommended . '</td>';
     if ($fix) {
         echo '<td>
                 <input type="submit" name="aiowps_fix_permissions" value="' . __('Set Recommended Permissions', 'aiowpsecurity') . '" class="button-secondary" />
                 <input type="hidden" name="aiowps_permission_chg_file" value="' . $path . '"/>
                 <input type="hidden" name="aiowps_recommended_permissions" value="' . $recommended . '"/>                        
                 </td>';
     } else {
         echo '<td>' . __('No Action Required', 'aiowpsecurity') . '</td>';
     }
     echo "</tr>";
 }
开发者ID:Rudchyk,项目名称:wp-framework,代码行数:41,代码来源:wp-security-filesystem-menu.php

示例2: check_filesystem_permissions_feature

 function check_filesystem_permissions_feature($item)
 {
     //TODO
     $is_secure = 1;
     $util = new AIOWPSecurity_Utility_File();
     $files_dirs_to_check = $util->files_and_dirs_to_check;
     foreach ($files_dirs_to_check as $file_or_dir) {
         $actual_perm = AIOWPSecurity_Utility_File::get_file_permission($file_or_dir['path']);
         $is_secure = $is_secure * AIOWPSecurity_Utility_File::is_file_permission_secure($file_or_dir['permissions'], $actual_perm);
     }
     //Only if all of the files' permissions are deemed secure give this a thumbs up
     if ($is_secure == 1) {
         $item->set_feature_status($this->feature_active);
     } else {
         $item->set_feature_status($this->feature_inactive);
     }
 }
开发者ID:arobbins,项目名称:spellestate,代码行数:17,代码来源:wp-security-feature-item-manager.php


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