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


PHP dirfile_check函数代码示例

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


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

示例1: switch

EOF;
$html_footer = <<<EOF
<div class="footer">
  <h6><a href="http://www.33hao.com" target="_blank">程序来源于 bbs.33hao.com</a></h6>
</div>
EOF;
require './include/function.php';
if (!in_array($_GET['step'], array(1, 2, 3, 4, 5))) {
    $_GET['step'] = 0;
}
switch ($_GET['step']) {
    case 1:
        require './include/var.php';
        env_check($env_items);
        dirfile_check($dirfile_items);
        function_check($func_items);
        break;
    case 3:
        $install_error = '';
        $install_recover = '';
        $demo_data = file_exists('./data/utf8_add.sql') ? true : false;
        step3($install_error, $install_recover);
        break;
    case 4:
        step4();
        break;
    case 5:
        $sitepath = strtolower(substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')));
        $sitepath = str_replace('/shop/install', "", $sitepath);
        $auto_site_url = strtolower('http://' . $_SERVER['HTTP_HOST'] . $sitepath);
开发者ID:ff00x0,项目名称:shopnc,代码行数:30,代码来源:index.php

示例2: str_replace

                $str = str_replace('$config[\'admin_folder\']=\'admin\';', '$config[\'admin_folder\']=\'' . $admin_folder . '\';', $str);
                file_put_contents($ConfigPath, $str);
                rename('../application/controllers/admin', '../application/controllers/' . $admin_folder);
                $sql = 'update lee_user set username="' . $username . '",password="' . $userpass . '",salt="' . $salt . '" where id=1';
                mysql_query($sql);
                @fopen("../data/install.lock", 'w');
                $error = $lang['installok'] . '<br><a href="' . $base_url . '" target="_blank">' . $lang['frontmana'] . $base_url . '</a><br><a href="' . $base_url . 'index.php?/' . $admin_folder . '/login" target="_blank">' . $lang['blackmana'] . $base_url . 'index.php?/' . $admin_folder . '/login</a>';
                $step = 2;
            }
        }
    } else {
        $error = $lang['alldatabaseinfo'];
    }
} else {
    $dirfile = array(0 => array('path' => '../data', 'type' => 'dir'), 1 => array('path' => '../data/attachment', 'type' => 'dir'), 2 => array('path' => '../data/backup', 'type' => 'dir'), 3 => array('path' => '../data/bak', 'type' => 'dir'), 4 => array('path' => '../data/cache', 'type' => 'dir'), 5 => array('path' => '../data/sitemap', 'type' => 'dir'), 6 => array('path' => '../application/controllers/admin', 'type' => 'dir'), 7 => array('path' => '../application/config/database.php', 'type' => 'file'), 8 => array('path' => '../application/config/config.php', 'type' => 'file'), 9 => array('path' => '../data/template', 'type' => 'dir'));
    $dirfile = dirfile_check($dirfile);
}
$url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
$url = substr($url, 0, -17);
function dirfile_check($dirfile_items)
{
    foreach ($dirfile_items as $key => $item) {
        $item_path = $item['path'];
        if ($item['type'] == 'dir') {
            if (!dir_writeable(FCPATH . $item_path)) {
                if (is_dir(FCPATH . $item_path)) {
                    $dirfile_items[$key]['status'] = 0;
                    $dirfile_items[$key]['current'] = '+r';
                } else {
                    $dirfile_items[$key]['status'] = -1;
                    $dirfile_items[$key]['current'] = 'nodir';
开发者ID:pondyond,项目名称:x6cms,代码行数:31,代码来源:index.php


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