A
A
Alexander Sharomet2017-01-11 17:06:12
PHP
Alexander Sharomet, 2017-01-11 17:06:12

Why is all content duplicated in iframe?

Hello.
There was such a problem.
When I insert an iframe into a view, all the content is duplicated several times.
What could be the reason. Thank you.
router.php

if(empty($url[0])){
require_once ROOT.'controllers/index_controller.php';
$controller = new Index_controller();
$controller->loadModel('index');
$controller -> index();
exit;
}

index_controller.php
function __construct(){
parent::__construct();
$this -> view -> title = 'Theme';
}
public function index(){
$this -> view -> render('index/index');
}

view index.php
<iframe src="preview.php" id="theme-preview" frameborder="0"></iframe>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question