我有一个基于wordpress的分类广告网站,我正在尝试创建和xml feed应用程序,从其他网站获取xml并创建广告.我能够从feed创建wordpress中的帖子.但我无法从远程服务器复制图像,没有权限问题,我使用worpress函数wp_handle_upload_error,但我得到错误
这个代码
public function xml_image_upload($upload)
{
if ($this->xml_file_is_image($upload['tmp_name']))
{
$file = wp_handle_upload($upload, $overrides);
}
return $file;
}
Run Code Online (Sandbox Code Playgroud)
我得到的错误是" 无效的表单提交 "
我试图解决这个问题很长一段时间.我不知道什么是错的..