本文整理匯總了PHP中Index::main方法的典型用法代碼示例。如果您正苦於以下問題:PHP Index::main方法的具體用法?PHP Index::main怎麽用?PHP Index::main使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Index
的用法示例。
在下文中一共展示了Index::main方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: session_start
<?php
/**
* Created by PhpStorm.
* User: kevinhuron
* Date: 18/12/2015
* Time: 14:16
*/
session_start();
$request = NULL;
if (isset($_REQUEST)) {
$request = $_REQUEST;
}
Index::main($request);
use Controller\Controller;
class Index
{
/** MAIN FUNCTION
* @param $request
*/
public static function main($request)
{
require_once "Starter.php";
new Starter();
$controller = new Controller();
if ($request == NULL && self::check_login() == 0) {
echo $_SESSION['twig']->render("login.html.twig");
} else {
if ($request == NULL && self::check_login() == 1) {
$controller->indexAction();
} else {
示例2: main
{
$this->head = new Head();
$this->banner = new Banner();
$this->navegador = new Navegador();
$this->contenido = new Contenido();
$this->userControl = new UserControl();
$this->srcImg1 = 'images/banner/images/';
$this->srcImg2 = 'images/banner/tooltips/';
$this->view = $vista;
}
public function main()
{
if (isset($_POST['grabar']) and $_POST['grabar'] == 'si') {
$this->userControl->logueo();
}
$retornar = "<html>";
$retornar .= $this->head->imprimirHead();
$retornar .= "<body>";
$retornar .= $this->banner->imprimirBanner($this->srcImg1, $this->srcImg2);
$retornar .= $this->navegador->imprimirNavegador();
$retornar .= "<div id='main'>";
$retornar .= $this->contenido->imprimirContenido();
$retornar .= "</div>";
$retornar .= "</body>";
$retornar .= "</html>";
echo $retornar;
}
}
$index = new Index();
$index->main();
示例3: exit
<?php
if (version_compare(PHP_VERSION, '5.1.0', '<')) {
exit('Your current PHP version is: ' . PHP_VERSION . '. Haxe/PHP generates code for version 5.1.0 or later');
}
require_once dirname(__FILE__) . '/lib/php/Boot.class.php';
Index::main();