<?php //Starta session. session_start(); require_once 'src/navigation/controller/NavigationController.php'; require_once 'src/navigation/view/HTMLView.php'; //Skapar en ny Navigation Controller. $nc = new NavigationController(); $HTMLBody = $nc->doNavigation(); //Skapar en ny HTMLView. $view = new HTMLView(); $view->echoHTML($HTMLBody);
<?php require_once "src/view/HTMLView.php"; require_once "src/controller/NavigationController.php"; session_start(); $view = new \HTMLView(); $navigation = new \NavigationController(); $content = $navigation->doControll(); $view->echoHTML($content);
<?php require_once "src/view/HTMLView.php"; require_once "src/controller/Navigation.php"; $view = new HTMLView(); $navigation = new \controller\Navigation(); $htmlBody = $navigation->doControll(); $view->echoHTML($htmlBody);
<?php ini_set('display_errors', '1'); error_reporting(E_ALL); require_once "app/views/v_html.php"; require_once "app/controllers/c_login.php"; $htmlBody = "<h1>Laborationskod mn22nw</h1>"; /*--------------------------------------------------------------- -creates new instance of LoginController -runs doLogin, a function that returns html-code to be put in body of HTML ----------------------------------------------------------------- */ $lc = new \controllers\LoginController(); $htmlBody .= $lc->doLogin(); // ---------------------------------// $title = "Labb 2"; $head = '<link rel="stylesheet" type="text/css" href="css/login.css">'; setlocale(LC_TIME, 'swedish'); date_default_timezone_set('Europe/Stockholm'); $date = ucfirst(strftime("%A, den %d %B år %Y. Klockan är [%H:%M:%S].")); $htmlBody .= $date; $view = new HTMLView(); $view->echoHTML($title, $head, $htmlBody, $date);
<?php require_once "..\\LogIn\\HTMLView.php"; require_once "..\\LogIn\\LogInController.php"; session_start(); $controller = new LogInController(); $htmlbody = $controller->doControll(); $view = new HTMLView(); $view->echoHTML($htmlbody);
<?php //Läser in filerna HTMLView samt LoginController. require_once 'View/HTMLView.php'; require_once 'Controller/LoginController.php'; //Startar en session när en användare surfar in på hemsidan session_start(); //view-variabeln öppnar anslutning till HTMLView och LC till LoginController-klassen. $view = new HTMLView(); $LC = new LoginController(); //Kör funktionen doControl ifrån LoginController-klassen och.. $viewLogin = $LC->doController(); //skickar sedan med den till HTMLView-klassen där echoHTML tar emot svaret $view->echoHTML($viewLogin);
<?php require_once "HTMLView.php"; $view = new HTMLView(); $view->echoHTML("Hello World");
<?php session_start(); error_reporting(E_ALL); ini_set('display_errors', 'on'); ini_set('default_charset', 'UTF-8'); date_default_timezone_set('Europe/Stockholm'); require_once "view/HTMLview.php"; require_once "controller/controller.php"; $view = new HTMLView(); $Controller = new ControllerClass(); $ControllerFormControll = $Controller->formControll(); $view->echoHTML($ControllerFormControll);