yii中显示yii\web\notfoundhttpexception错误怎么解决

我下载了一个yii做的项目,里面有个app用到的api模块,里面有子模块w1,请问如何访问到这些模块的方法!请高手指点!!!<?php$params = array_merge( require(__DIR__ . '/../../common/config/params.php'), require(__DIR__ . '/../../common/config/params-local.php'), require(__DIR__ . '/params.php'), require(__DIR__ . '/params-local.php'));return [ 'id' => 'app-api', 'basePath' => dirname(__DIR__), 'controllerNamespace' => 'api\controllers', 'bootstrap' => ['log'], 'modules' => [ //'g1' => [ // 'class' => 'api\modules\g1\Module' //], 'w1' => [ 'class' => 'api\modules\w1\Module' ], ], 'components' => [ 'user' => [ 'identityClass' => 'common\models\User', 'enableSession' => false, //'loginUrl' => null, 'loginUrl' => ['auth/login'], 'enableAutoLogin' => false, 'identityCookie' => ['name' => '_identity-api', 'httpOnly' => true], 'authTimeout' => 7200, // 2小时无操作自动退出登录 ], 'errorHandler' => [ 'class' => 'api\components\RestErrorHandler', 'errorAction' => 'site/error', 'maxSourceLines' => 20, ], 'log' => [ 'traceLevel' => YII_DEBUG ? 5 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], ], ], 'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ 'notify/pay/<type:\w+>' => 'notify/pay', ], ], ], 'params' => $params,];

页面没找到,自己配置的文件么

果你想显示一个错误页面告诉用户请求是无效的或无法处理的, 可简单地抛出一个 HTTP exception异常, 如 yii\web\NotFoundHttpException。 错误处理器会正确地设置响应的HTTP状态码并使用合适的错误视图页面来显示错误信息。
use yii\web\NotFoundHttpException;
throw new NotFoundHttpException();

你应该是use这个了吧
温馨提示:答案为网友推荐,仅供参考