request; if ($request->isPost){ //先提取本地数据对比 $data=file_put_contents('./web/secret.json',Yii::$app->request->post('lock')); die; } } public function actionReject(){ $request = Yii::$app->request; if ($request->isPost){ $data=file_put_contents('./web/secret.json',''); die; } } }