ThinkPHP Background Home index Using frameset Matters Needing Attention Analysis

  • 2021-07-13 04:54:57
  • OfStack

The frameset tag of html is widely used in multi-window programming, especially in the background page of the project. This article will analyze the considerations when ThinkPHP background homepage index uses frameset. The details are as follows:

File path: aoli/admin/Lib/Action/IndexAction. class. php

The code is as follows:


<?php
 class IndexAction extends Action{
  public function index(){
   $this->display();
  }
  public function top(){
   $this->display();
  }
  public function left(){
   $this->display();
  }
  public function right(){
   $this->display();
  }
 }
?>

File path: aoli/admin/Tpl/default/Index

The code for the index. html page is as follows:


 <frameset rows="20%,*">
  <frame src="__URL__/top" name="top">
  <frameset cols="20%,*">
   <frame src="__URL__/left" name="left">
   <frame src="__URL__/right" name="right">
  </frameset>
 </frameset>

top. html (omitted)

left. html (omitted)

right. html (omitted)

Precautions:

When calling top. html, left. html, right. html, the method should be called with the path __URL_/, but the template should not be called with __TMPL_/Index/.

Interested readers can debug and run the examples in this article to experience the specific usage of path call.


Related articles: