创建文件验证(用于测试目的,大小为 5kb)
'file': "max:5|mimes:jpg,png,jpeg,pdf,txt,doc,docx,mp4"
有一个奇怪的问题,因为它在上传 png 时显示有效错误
...may not be greater than 5 kilobytes.
但是在上传mp4时,它抛出以下错误
RuntimeException: The file {path-here}\public cannot be opened. in file
{path-here}\vendor\nyholm\psr7\src\Factory\Psr17Factory.php on line 46
最佳答案
- 打开窗口右侧的图标托盘。
- 左键单击 wamp 图标。
- 点击 PHP > PHP 设置 > upload_max_filesize =(将大小设置为最大 256 MB)。
You can also edit it in php.ini file in
C:\wamp64\bin\apache\apache2.4.37\bin\php.ini
click here for image
关于php - Laravel 8.38 验证问题,最大文件大小。文件 Psr17Factory.php 第 46 行中的 RuntimeException : The file {public path} cannot be opened.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67280176/