Exemplo n.º 1
0
Arquivo: 2.php Projeto: xiuno/xiunophp
<?php

/*
	功能:演示 Hello, world.
	注意:当通过 AJAX 请求的时候,输出格式为 json
*/
chdir('../../../');
include './xiunophp/xiunophp.php';
xn_message(0, 'Hello, world.');
/*
输出:
Hello, world.
AJAX 请求输出:
{code:0, message:"Hello, world."}
*/
Exemplo n.º 2
0
function cache_truncate()
{
    global $cache;
    if (!$cache) {
        return FALSE;
    }
    $r = $cache->truncate();
    if ($r === FALSE && $cache->errno != 0) {
        xn_message(-1, $cache->errstr);
    }
    return $r;
}