JavaShuo
欄目
標籤
tp5 ThinkPHP5 報Serialization of 'Closure' is not allowed
時間 2021-01-09
欄目
PHP
简体版
原文
原文鏈接
今天在寫查詢時碰到這個問題: 原因:如果你的全局域裏有閉包的話就會報錯爲 「對閉包的序列化是不允許的」 , 我發現我前面寫的where() 方法中使用了閉包,查詢結果使用了cache()方法(cache方法是將數據序列化存入文件中),去除cache方法後不會報此錯誤,或者不使用where閉包方法也不會報此錯誤,任意修改其中之一之後就不會報這個錯誤了。
>>阅读原文<<
相關文章
1.
Error: Content is not allowed in prolog
2.
Mysql報錯"Host '27,45,38,132' is not allowed to connect
3.
ios打包報錯:User interaction is not allowed
4.
APPS:Bother, why password reuse is not allowed
5.
Navigating to current location ("/") is not allowed
6.
Public Key Retrieval is not allowed
7.
JDBC:Public Key Retrieval is not allowed
8.
[ERROR]element select is not allowed here
9.
C++ Class incomplete type is not allowed
10.
SQLNonTransientConnectionException: Public Key Retrieval is not allowed
更多相關文章...
•
PHP Closure::call()
-
PHP 7 新特性
•
SQL NOT NULL 約束
-
SQL 教程
•
PHP Ajax 跨域問題最佳解決方案
•
Kotlin學習(一)基本語法
相關標籤/搜索
closure
allowed
serialization
tp5
thinkphp5
not...else
tutorial1.serialization
for...of
for..of
this.props....is
PHP
JavaScript
PHP 7 新特性
Spring教程
Redis教程
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
FM理論與實踐
2.
Google開發者大會,你想知道的都在這裏
3.
IRIG-B碼對時理解
4.
乾貨:嵌入式系統設計開發大全!(萬字總結)
5.
從域名到網站—虛機篇
6.
php學習5
7.
關於ANR線程阻塞那些坑
8.
android studio databinding和include使用控件id獲取報錯 不影響項目正常運行
9.
我女朋友都會的安卓逆向(四 動態調試smali)
10.
io存取速度
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
1.
Error: Content is not allowed in prolog
2.
Mysql報錯"Host '27,45,38,132' is not allowed to connect
3.
ios打包報錯:User interaction is not allowed
4.
APPS:Bother, why password reuse is not allowed
5.
Navigating to current location ("/") is not allowed
6.
Public Key Retrieval is not allowed
7.
JDBC:Public Key Retrieval is not allowed
8.
[ERROR]element select is not allowed here
9.
C++ Class incomplete type is not allowed
10.
SQLNonTransientConnectionException: Public Key Retrieval is not allowed
>>更多相關文章<<