Yii2 查看在 Windows 中正确渲染但在 MAC 上不正确

问题描述

我正在使用 yii2 在 mac build 上安装现有应用程序。在 Windows 上一切正常,但是当我尝试在 mac 上渲染它时,它不显示任何东西。非常感谢您在这方面的任何帮助。

当前控制器代码

`

{
    $model = new Aregistration();
    $needUpload = false;
    $modelUpload = new Upload();
    $request = Yii::$app->request;
    if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
        Yii::$app->response->format = Response::FORMAT_JSON;
        return ActiveForm::validate($model);
    }
    if ($request->post('Aregistration') != null) {
        $model->attributes = $request->post('Aregistration');
        try {
            if ($this->handleSubmission($model,$modelUpload,$needUpload)) {
                $submissionNo = $model->submissionNo;
                $model->attributes = null;
                $modelUpload->attributes = null;
                return $this->render('confirm',['submissionNo' => $submissionNo]);
            }
        } catch (\Exception $e) {
            $model->attributes = null;
            $modelUpload->attributes = null;
            return $this->render('error',['message' => $e->getMessage()]);
        }
    }

    return $this->render('registration',['model' => $model]);
}`

View 是 .. 它是一个简单的视图并且已经删除了原始代码

<?PHP echo "I am here in the view"; ?>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)