當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Index::process方法代碼示例

本文整理匯總了PHP中Index::process方法的典型用法代碼示例。如果您正苦於以下問題:PHP Index::process方法的具體用法?PHP Index::process怎麽用?PHP Index::process使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Index的用法示例。


在下文中一共展示了Index::process方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: while

        if ($result->num_rows > 0) {
            if ($annotation->role) {
                while ($row = $result->fetch_assoc()) {
                    if ($annotation->role != $row['role']) {
                        return false;
                    }
                }
            }
            $db->close();
            return true;
        } else {
            $db->close();
            return false;
        }
    }
    function extendAuthentication($ticket)
    {
        $db = new Database('tazapi');
        $db->open();
        $dateTime = new DateTime('+1 hour', new DateTimeZone('Europe/Vilnius'));
        $expires = $dateTime->format('Y-m-d H:i:s');
        $sql = "UPDATE tickets SET expires='" . $expires . "' WHERE ticket = '" . $ticket . "';";
        $db->conn()->query($sql);
        $db->close();
    }
}
$indexWebscript = new Index();
$indexWebscript->process($_GET['webscript'], $_GET['method']);
?>
             
開發者ID:NForce,項目名稱:TAZClients,代碼行數:29,代碼來源:index.php

示例2: unset

        $request_data['action'] = $args['action'];
        unset($args['action']);
    } else {
        if (DEBUG) {
            echo "Warning: No action defined. Usage: index.php --action=<action>\n";
        }
    }
    /**
     * Load the script arguments.
     */
    $request_data['args'] = $args;
} else {
    /**
     * Has an action been defined.
     */
    if (isset($_GET['action'])) {
        $request_data['action'] = $_GET['action'];
    } else {
        if (DEBUG) {
            echo "Warning: No action defined. <br/>Usage: index.php?action=&lt;action&gt;<br/>";
        }
    }
    /**
     * Load the page data.
     */
    $request_data['data']['get'] = $_GET;
    $request_data['data']['post'] = $_POST;
}
$index = new Index($request_data);
$index->process();
開發者ID:AntoCuc,項目名稱:two-stroke,代碼行數:30,代碼來源:index.php

示例3: testTemplateManagerWithDifferentTemplate

 public function testTemplateManagerWithDifferentTemplate()
 {
     $app = new Index();
     $app->controller = "index";
     $app->action = "test";
     $app->template = "template_2.php";
     $app->process();
     $this->assertTrue(is_a($app, "index"));
     $this->assertEquals($app->table, "foo");
     $html = $app->loadApp();
     $this->assertTrue(strpos($html, "DOCTYPE html>") > 0);
     $this->assertTrue(strpos($html, "<meta charset=\"UTF-8\">") > 0);
     $this->assertTrue(strpos($html, "<title>A template with a different title</title>") > 0);
     $this->assertTrue(strpos($html, "Some text inside the view:FooBar-foo") > 0);
     $this->assertTrue(strpos($html, "</html>") > 0);
 }
開發者ID:giraldomauricio,項目名稱:phpXelerator5,代碼行數:16,代碼來源:applicationTest.php


注:本文中的Index::process方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。