当我尝试在浏览器中打开任何模型和控制器文件时,我是使用 YII 和 Gii 的 PHP 新手,我收到错误错误控制台和代码是: 代码:
<?php
class UsersController extends Controller {
public function actionIndex() {
$this->render('index');
}
public function actionLogIn() {
if (isset($_POST['user_name']) && !empty($_POST['user_name']) && isset($_POST['password']) && !empty($_POST['password'])) {
$username = strtolower($_POST['user_name']);
$pass = MD5($_POST['password']);
$record = Users::model()->find('user_name=:username and password=:pass and status=:status', array(':username' => $username, ':pass' => $pass, ':status' => 'ACTIVE'));
if($record){
$response['status'] = true;
$response['message'] = "Successfully Logged In.";
$response['user'] = $record;
} else {
$response['status'] = false;
$response['message'] = "Username Or Password did not Match.";
}
echo CJSON::encode($response);
}
}
}
这是浏览器中出现的错误
有人可以指出这个错误是什么意思吗?