我正在尝试上传图片并在上传后立即竖起拇指,并在点击拇指时获取链接(路径)。所以我在youtube上发现了这个视频,它提供了我所需要的东西,但是当我完全遵循这些代码时,我得到了这些错误。评论中的每个人似乎都没有对vid中显示的代码有任何问题,但我和我的朋友单独遵循它,但我们遇到了同样的问题。我真的希望它能够发挥作用。
这是我正在谈论的视频教程: https://www.youtube.com/watch?v=RG0NAVPNvoo
这些是错误:
A PHP Error was encountered
Severity: Warning
Message: scandir(): Directory name cannot be empty
Filename: models/gallery_model.php
Line Number: 49
A PHP Error was encountered
Severity: Warning
Message: array_diff(): Argument #1 is not an array
Filename: models/gallery_model.php
Line Number: 50
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: models/gallery_model.php
Line Number: 52