Argument 2 passed to think\\filesystem\\Driver::putFile() must be an instance of think\\File

简介: Argument 2 passed to think\\filesystem\\Driver::putFile() must be an instance of think\\File

ThinkPHP6.0上传文件,小文件可以正常上传,稍微大一点的文件就会报错

Argument 2 passed to think\\filesystem\\Driver::putFile() must be an instance of think\\File, null given

修改配置文件php.ini

# post_max_size = 8M
post_max_size = 100M
# upload_max_filesize = 2M
upload_max_filesize = 100M

参考

http://www.thinkphp.cn/topic/28078.html

相关文章
|
2月前
1.6 password file must not be other-accessible21
1.6 password file must not be other-accessible21
31 1
Invalid mapping pattern detected: /download/{{fileName}} ^Not allowed to nest variable c
Invalid mapping pattern detected: /download/{{fileName}} ^Not allowed to nest variable c
|
缓存 JavaScript
Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs‘TypeError: Cannot read proper
Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs‘TypeError: Cannot read proper
139 0
|
6月前
|
Shell
adb: error: cannot create file/directory ‘d:/1.png‘: No such file or directory
adb: error: cannot create file/directory ‘d:/1.png‘: No such file or directory
102 0
|
6月前
|
DataWorks Linux API
“Invalid folder
“Invalid folder
94 2
|
6月前
Parsing error: No Babel config file detected for XXXXX
Parsing error: No Babel config file detected for XXXXX
|
Python
ERROR: file or directory not found: xx.py
​ 1、问题出现原因 在vscode中已导入pytest框架,做自动化demo小测试,运行Python文件一直出现如题错误,截图如下: ERROR: file or directory not found: xx.py  2、解决办法 1)直接把该文件移到当前主目录下,放在PYTHON-STUDY下 2)VSCode中右键tuopan.py文件,选择[在集成终端中打开],或者通过CD命令进入到tuopan.py文件所在目录 然后输入以下命令即可: 注:上述命令不是换行,在d:/前有空格 ,第一行信息为python所在安装路径,空格后的换行为运行的python文件的所在路径  
155 0
|
JavaScript
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
188 0
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
cl.exe is unable to create an executable file. C compiler test failed.
cl.exe is unable to create an executable file. C compiler test failed.
198 0
|
文字识别
解决pytesseract.pytesseract.TesseractError: (1, ‘Error opening data file C:\\Program Files\\Tesseract-
pytesseract.pytesseract.TesseractError: (1, ‘Error opening data file C:\Program Files\Tesseract-OCR\tessdata/chi_sim.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your “tessdata” directory. Failed loading language ‘chi_sim’ Tesseract couldn’t load any languages! Cou
1416 0
解决pytesseract.pytesseract.TesseractError: (1, ‘Error opening data file C:\\Program Files\\Tesseract-