PHP Classes

File: demo.php

Recommend this page to a friend!
  Classes of Ezhaym Najera M   View   demo.php   Download  
File: demo.php
Role: Example script
Content type: text/plain
Description: Example script
Class: View
Generate HTML for page views from variable values
Author: By
Last change: v1.1
Date: 4 years ago
Size: 741 bytes


Class file image Download

include_once 'View.php';

// Create a new View. By default, it will search for main.html layout
// Crear una nueva Vista. Por default, buscará el layout main.html
$view = new View();

// Set index.html as file to get contents (only name)
// Elegir a index.html como el archivo para el contenido (solo el nombre)

// Add external source files to <head> of Layout
// Agregar archivos externos al <head> del Layout
$view->addHeader('css/styles.css', 'css');

// Add data to {h} & {w} variables from index.html
// Agregar datos a las variables {h} y {w} de index.html
'h' => 'Hello',
'w' => 'World!'

// Print view
// Imprimir vista