php - Yii Controller Can't Find View


Hi guys i try to go to http://localhost:8080/index.php?r=post URL but i watch #404 Error. I use yii and I created a controller called


. You can watch my post controller codes here:

       namespace backend\controllers;
       use yii\web\Controller;

       class PostController extends Controller{
       public function actionIndex()
          return $this->render('index');

Also I created a index.php file inside


You can watch index.php codes under this text

echo 'This is a test';



did you try to modify your route with following? http://localhost:8080/post/index where post is your controller name and index action. Try to configure URL manager, adding some rules to handle route above. Yii 2.0 documentation is pretty extensive. Check This

People are also looking for solutions to the problem: php - MySql - three sucessfully joined tables, but failing to get one column result?


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.