i'm new in php coding and i'm using yii2 framework i'm trying to make a simple project as follow: in the backend/controllers i added a .php file named "PostController.php" and i wrote this codes in this file:
<?php
namespace backend\controllers;
use yii\web\Controller;
class PostController extends Controller
{
public function actionIndex()
{
return $this->render('index');
}
}
?>
and i created a file in beckend/views named "post" and in this folder i created a .php file named index.php then i just wrote one line in index.php for test as bellow:
<h1>Hello World</h1>
now i want to see this index file (Hellw World) in my browser. which url i should enter in my browser to see that? i tried the bellow url and it didn't worked!:
http://ift.tt/2jXs0X7
Aucun commentaire:
Enregistrer un commentaire