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


PHP main::perms方法代码示例

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


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

示例1: conf_perms

 public function conf_perms()
 {
     if (is_writable(INC . "/conf.inc.php")) {
         if (main::perms(INC . "/conf.inc.php", 0444)) {
             main::errors("Configuration File made unwritable.");
         } else {
             main::errors("Failed to make the configuration file unwritable.");
         }
     } else {
         main::errors("Configuration File is already unwritable.");
     }
     echo style::replaceVar('tpl/admin/system/perms-tools.tpl');
 }
开发者ID:cozylife,项目名称:tht-reworked,代码行数:13,代码来源:system.php

示例2: checkPerms

 public function checkPerms($file)
 {
     if (is_writable($file)) {
         return true;
     } else {
         main::perms($file, 0777);
         if (is_writable($file)) {
             return true;
         } else {
             main::perms($file, 0777);
             return false;
         }
     }
 }
开发者ID:cozylife,项目名称:tht-reworked,代码行数:14,代码来源:class_automod.php

示例3: generateSiteUrl

    include INC . "/conf.inc.php";
    if (!writeconfig($sql['host'], $sql['user'], $sql['pass'], $sql['db'], $sql['pre'], "false")) {
        $install_array['ANYTHING'] = "Your {$link} isn't writeable or does not exist.  Please make it writable and make sure it exists.";
        $disable = true;
    } else {
        $install_array['ANYTHING'] = "Since you've already ran the installer, your config has been re-written to the \"not installed\" state. If you are upgrading, this is normal!<br>";
    }
}
if (!file_exists($link)) {
    if (!fopen($link, "w+")) {
        $install_array["ANYTHING"] = "Your {$link} file doesn't exist. Please create it as a blank file and make it writable.";
        $disable = true;
    }
}
if (!is_writable($link)) {
    if (!main::perms($link, 0666)) {
        $install_array["ANYTHING"] = "Your {$link} isn't writeable.  Please make it writable.";
        $disable = true;
    }
}
echo style::get("header.tpl");
if ($disable) {
    echo '<script type="text/javascript">$(function(){
$(".twobutton").attr("disabled", "true");$("#method").attr("disabled", "true");}
);</script>';
}
$install_array["GENERATED_URL"] = generateSiteUrl();
echo style::replaceVar("../install/includes/tpl/install.tpl", $install_array);
echo style::get("footer.tpl");
include INC . "/output.php";
//Output it
开发者ID:cozylife,项目名称:tht-reworked,代码行数:31,代码来源:index.php

示例4: checkPerms

 private function checkPerms($file)
 {
     if (is_writable($file)) {
         if (main::perms($file, 0444)) {
             return "";
         } else {
             return "<div class='warn'><img src='../themes/icons/error.png' alt='' /> Warning: Configuration file (conf.inc.php) is still writable!</div>";
         }
     } else {
         return "";
     }
 }
开发者ID:cozylife,项目名称:tht-reworked,代码行数:12,代码来源:home.php


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