亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

PHP/Phalcon 錯誤:沒有發送請求就關閉了;它可能只是一個未使用的推測性預連接

PHP/Phalcon 錯誤:沒有發送請求就關閉了;它可能只是一個未使用的推測性預連接

PHP
天涯盡頭無女友 2023-05-26 17:28:43
我有一個基本的控制器動作:    public function createAction() {        $this->view->disable();        $formData = $this->request->getJsonRawBody();        $user = new Users();        $user->first_name = $formData->first_name;        $user->last_name = $formData->last_name;        $user->email_address = $formData->email_address;        $user->password = $formData->password;        // this prints to my debug log.        $result = $user->save();         AppLogger::$logger->debug(print_r($result, true)); // this does not print.        AppLogger::$logger->debug("oh boy #2"); // this does not print either.        // which seems to tell me that the line above it is problematic,        // but there is no error output from `phalcon serve`        echo Json::encode($result);    }我看到的最接近錯誤的是PHP/Phalcon Error: Closed without sending a request; it was probably just an unused speculative preconnection:這出現在 的輸出中phalcon serve。我phalcon serve在 Windows 上運行 VSCode。
查看完整描述

3 回答

?
交互式愛情

TA貢獻1712條經驗 獲得超3個贊

當用戶嘗試注銷時遇到同樣的問題,重新啟動我的服務器(laravel 內置服務器)并且它非常有效。



查看完整回答
反對 回復 2023-05-26
?
莫回無

TA貢獻1865條經驗 獲得超7個贊

我通過包裝$result = $user->save();在 try/catch 中解決了這個問題,然后我能夠看到異常。

似乎這個異常并沒有自動顯示在終端輸出中......


查看完整回答
反對 回復 2023-05-26
?
MM們

TA貢獻1886條經驗 獲得超2個贊

如果您正在克隆 Laravel 項目,請確保您的.env文件已創建。他們有敏感信息,可能會保存在.gitignore中。



查看完整回答
反對 回復 2023-05-26
  • 3 回答
  • 0 關注
  • 519 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號