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


PHP Helpers::rglob方法代码示例

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


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

示例1: get_partial_template

 static function get_partial_template($name)
 {
     # return contents of partial file, or return 'not found' error (as text)
     if (!self::$partials) {
         self::$partials = Helpers::rglob('./templates/partials*/*.*');
     }
     foreach (self::$partials as $partial) {
         if (preg_match('/([^\\/]+?)\\.[\\w]+?$/', $partial, $file_name)) {
             if ($file_name[1] == $name) {
                 return file_get_contents($partial);
             }
         }
     }
     return 'Partial \'' . $name . '\' not found';
 }
开发者ID:jcsiegrist,项目名称:stacey,代码行数:15,代码来源:template-parser.inc.php

示例2: ob_start

<?php

ob_start();
# let people know if they are running an unsupported version of PHP
if (phpversion() < 5) {
    die('<h3>Cindy requires PHP/5.0 or higher.<br>You are currently running PHP/' . phpversion() . '.</h3><p>You should contact your host to see if they can upgrade your version of PHP.</p>');
} else {
    # require helpers class so we can use rglob
    require_once './app/helpers.inc.php';
    # include any php files which sit in the app folder
    include_once "config.php";
    foreach (Helpers::rglob('./app/**.inc.php') as $include) {
        include_once $include;
    }
    foreach (Helpers::rglob('./plugins/**config.php') as $include) {
        include_once $include;
    }
    # start the app
    new Stacey($_GET);
}
ob_flush();
开发者ID:andreaspada,项目名称:cindy,代码行数:21,代码来源:index.php

示例3: die

<?php

# let people know if they are running an unsupported version of PHP
if (phpversion() < 5) {
    die('<h3>Stacey requires PHP/5.0 or higher.<br>You are currently running PHP/' . phpversion() . '.</h3><p>You should contact your host to see if they can upgrade your version of PHP.</p>');
} else {
    # require helpers class so we can use rglob
    require_once './app/helpers.inc.php';
    # include any php files which sit in the app folder
    foreach (Helpers::rglob('./app/**.inc.php') as $include) {
        include_once $include;
    }
    # start the app
    new Stacey($_GET);
}
开发者ID:zhxie,项目名称:hx-design-a1,代码行数:15,代码来源:index.php

示例4: die

<?php

# let people know if they are running an unsupported version of PHP
if (phpversion() < 5.2) {
    die('<h3>Stacey requires PHP/5.2 or higher.<br>You are currently running PHP/' . phpversion() . '.</h3><p>You should contact your host to see if they can upgrade your version of PHP (as 5.2 is pretty standard these days).</p>');
} else {
    # require config
    require_once './extensions/config.php';
    # require helpers class so we can use rglob
    require_once './app/helpers.inc.php';
    # require the yaml parser
    require_once './app/parsers/yaml/sfYaml.php';
    # include any php files which sit in the app folder
    foreach (Helpers::rglob('./app/**.inc.php') as $include) {
        include_once $include;
    }
    # include any custom extensions
    foreach (Helpers::rglob('./extensions/**.inc.php') as $include) {
        include_once $include;
    }
    # start the app
    new Stacey($_GET);
}
开发者ID:robertDpi,项目名称:platycms,代码行数:23,代码来源:index.php


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