您现在的位置是:首页 > cms教程 > phpcms教程phpcms教程

PHPCMS v9上传图片提示"undefined"的解决办法

白晴2025-05-03 16:44:38phpcms教程已有5人查阅

导读phpcms图片不存在的解决办法:首先找到并打开“attachments.php”文件;然后将“if(empty($this->userid)){”改成“if(empty($_POST['userid'])){”即可。

phpcms图片不存在的解决办法:首先找到并打开“attachments.php”文件;然后将“if(empty($this->userid)){”改成“if(empty($_POST['userid'])){”即可。
PHPCMS v9上传图片提示"undefined"的解决办法
把phpcms\modules\attachment\attachments.php中
if(empty($this->userid)){
改成
if(empty($_POST['userid'])){
因为在提交时$this->userid 为空,但在调用时用到了
$attachment->set_userid($_POST['userid']);
而$_POST['userid']即是userid的数据。
因此将$this->userid改成$_POST['userid']即可。

本文标签:

很赞哦! (0)

暂无内容
暂无内容
暂无内容
暂无内容
留言与评论 (共有 0 条评论)
昵称:
匿名发表 登录账号
         
验证码: