當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。