Skip to main content

Application::displayPage

Display compiled template with automatically variables and taking measures for Clickjacking

Description

public string Application::fetchPage( string $template )

displayPage method is equipped with the X-Frame-Options HTTP response header set to Deny so that no other contents from the other sites are embedded into your website.

Arguments

NameData typeDefaultRemarks
$templatestringTemplate file name

Example

code/application/Foo.php
<?php

class Foo extends Application
{
function bar(){
$this->displayPage( 'foo/bar' );
}
}

Displays the Application::fetchPage result after taking precautionary measures from Clickjacking attack.

note

It is recommended to use displayPage method in compiling your template file for the security of your web users/visitors.