public function install()
 {
     add_option("super_static_cache_mode", "close");
     add_option("super_static_cache_strict", true);
     add_option("super_static_cache_excet", "author,date,attachment");
     add_option("super_static_cache_nocachesinglepage", "");
     add_option("update_cache_action", "publish_post,post_updated,trashed_post,publish_page");
     //创建rewrite缓存目录
     if (!file_exists($this->wppath . 'super-static-cache')) {
         mkdir($this->wppath . 'super-static-cache', 0777);
     }
     file_put_contents($this->wppath . "super-static-cache/rewrite_ok.txt", "This is a test file from rewrite rules,please do not to remove it.\n");
     chmods($this->wppath . 'super-static-cache', 0777, 0444, true);
 }
Пример #2
0
         <input type="hidden" name="option" value="' . $option . '"/>';
                 echo $entryCheckbox;
                 echo '<input type="submit" name="submit" value="Nén"/>
     </form>
 </div>';
             } else {
                 if ($option === 4) {
                     $title = 'Chmod';
                     include_once 'header.php';
                     echo '<div class="title">' . $title . '</div>';
                     if (isset($_POST['submit']) && isset($_POST['is_action'])) {
                         echo '<div class="notice_failure">';
                         if (empty($_POST['folder']) || empty($_POST['file'])) {
                             echo 'Chưa nhập đầy đủ thông tin';
                         } else {
                             if (!chmods($dir, $entry, $_POST['folder'], $_POST['file'])) {
                                 echo 'Chmod thất bại';
                             } else {
                                 goURL('index.php?dir=' . $dirEncode . $pages['paramater_1']);
                             }
                         }
                         echo '</div>';
                     }
                     echo $entryHtmlList;
                     echo '<div class="list">
     <span>' . printPath($dir, true) . '</span><hr/>
     <form action="action.php?dir=' . $dirEncode . $pages['paramater_1'] . '" method="post">
         <span class="bull">&bull;</span>Thư mục:<br/>
         <input type="text" name="folder" value="' . (isset($_POST['folder']) ? $_POST['folder'] : '755') . '" size="18"/><br/>
         <span class="bull">&bull;</span>Tập tin:<br/>
         <input type="text" name="file" value="' . (isset($_POST['file']) ? $_POST['file'] : '644') . '" size="18"/><br/>