本文整理汇总了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();