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


PHP Settings::test方法代码示例

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


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

示例1: get_item

/** function get_item
 *		Generate the HTML content portion of the page
 *
 * @param string contents
 * @param string instructions for page
 * @param string [optional] title for page
 * @return string HTML content for page
 */
function get_item($contents, $hint, $title = '', $extra_html = '')
{
    $hint_html = "\n\t\t\t<p><strong>Welcome";
    if (!empty($GLOBALS['Player']) && !empty($_SESSION['player_id'])) {
        $hint_html .= ", {$GLOBALS['Player']->username}";
    }
    $hint_html .= '</strong></p>';
    if (is_array($hint)) {
        foreach ($hint as $line) {
            $hint_html .= "\n\t\t\t<p>{$line}</p>";
        }
    } else {
        $hint_html .= "\n\t\t\t<p>{$hint}</p>";
    }
    if ('' != $title) {
        $title = '<h2>' . $title . '</h2>';
    }
    $long_date = class_exists('Settings') && Settings::test() ? Settings::read('long_date') : 'M j, Y g:i a';
    $html = '
		<aside id="info">
			<div id="notes" class="box">
				<div>
					<div id="date">' . date($long_date) . '</div>
					' . $hint_html . '
				</div>
			</div>
			' . $extra_html . '
		</aside><!-- #info -->
		<div id="content" class="box">
			<div>
				' . $title . '
				' . $contents . '
			</div>
		</div><!-- #content -->
	';
    return $html;
}
开发者ID:benjamw,项目名称:pharaoh,代码行数:45,代码来源:html.general.php

示例2: define

        define('DEBUG', (bool) $debug);
        // set to true for output of debugging code
    }
    if (DEBUG) {
        if (isset($_GET['DEBUG'])) {
            $GLOBALS['_&_DEBUG_QUERY'] = '&DEBUG=' . $_GET['DEBUG'];
            $GLOBALS['_?_DEBUG_QUERY'] = '?DEBUG=' . $_GET['DEBUG'];
        } else {
            $GLOBALS['_&_DEBUG_QUERY'] = '';
            $GLOBALS['_?_DEBUG_QUERY'] = '?z';
        }
    }
}
$GLOBALS['_LOGGING'] = DEBUG;
// do not change, rather, change debug value
if (class_exists('Settings') && Settings::test()) {
    $Mysql->set_settings(array('log_errors' => Settings::read('DB_error_log'), 'email_errors' => Settings::read('DB_error_email'), 'email_from' => Settings::read('from_email'), 'email_to' => Settings::read('to_email')));
}
if (defined('DEBUG') && DEBUG) {
    ini_set('display_errors', 'On');
    error_reporting(-1);
    // everything
    if (isset($Mysql)) {
        $Mysql->set_error(3);
    }
}
// log the player in
if ((!defined('LOGIN') || LOGIN) && isset($Mysql)) {
    $GLOBALS['Player'] = new GamePlayer();
    // this will redirect to login if failed
    $GLOBALS['Player']->log_in();
开发者ID:studywithyou,项目名称:webrisk,代码行数:31,代码来源:inc.global.php

示例3: test_debug

/** function test_debug
 *		This function tests the debug given by the
 *		URL and checks it against the globals debug password
 *		and if they do not match, doesn't debug
 *
 * @param void
 * @action tests debug pass
 * @return bool success
 */
function test_debug()
{
    if (!isset($_GET['DEBUG'])) {
        return false;
    }
    if (!class_exists('Settings') || !Settings::test()) {
        return false;
    }
    if ('' == trim(Settings::read('debug_pass'))) {
        return false;
    }
    if (0 !== strcmp($_GET['DEBUG'], Settings::read('debug_pass'))) {
        return false;
    }
    return true;
}
开发者ID:studywithyou,项目名称:webrisk,代码行数:25,代码来源:func.global.php

示例4: test_debug

/** function test_debug
 *		This function tests the debug given by the
 *		URL and checks it against the globals debug password
 *		and if they do not match, doesn't debug
 *
 * @param void
 * @action tests debug pass
 * @return bool success
 */
function test_debug()
{
    if (!isset($_GET['DEBUG'])) {
        return false;
    }
    if (!class_exists('Settings') || !Settings::test()) {
        return false;
    }
    if ('' == trim(Settings::read('debug_pass'))) {
        return false;
    }
    if (0 !== strcmp($_GET['DEBUG'], Settings::read('debug_pass'))) {
        return false;
    }
    $GLOBALS['_&_DEBUG_QUERY'] = '&DEBUG=' . $_GET['DEBUG'];
    $GLOBALS['_?_DEBUG_QUERY'] = '?DEBUG=' . $_GET['DEBUG'];
    return true;
}
开发者ID:benjamw,项目名称:pharaoh,代码行数:27,代码来源:func.global.php

示例5: var_dump

<pre><?php 
require_once 'classes/mysql.class.php';
require_once 'classes/settings.class.php';
var_dump(class_exists('Settings') && Settings::test());
?>
</pre>
开发者ID:studywithyou,项目名称:webrisk,代码行数:6,代码来源:test.php


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