index.php
<?php
namespace app\index\controller;
use think\Controller;
class Index
{
public function index ()
{
Return 'php';
}
Public function Hello ()
{
Return $ This- & GT; fetch ();
} ##}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum- scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h2>I am the template file corresponding to the hello method in the Index controller in the Index template</h2>
</ body>
</html>
class Index does not inherit Controller
Enable DEBUG to learn detailed error reasons