PodioFile :: upload在本地主机上工作,但不在实时服务器上工作

时间:2019-11-05 07:42:41

标签: php podio

我正在创建一个Chrome扩展程序,该扩展程序可以使用Podio API PHP创建指向Podio的任务。另外,它可以附加文件。这在localhost上运行良好。但是,当我将php文件上传到实时服务器上时,我在PodioFile::upload中收到错误消息,并显示'PodioServerError'

$longStringPathAndName = "url_of_image|filename_of_image,url_of_image2|filename_of_image2"
$longArrayPathAndName = explode(",", $longStringPathAndName);
/*Declare the filearray holder */
$strAttachment = array();

/*Loop for every file item */
$xx = 1;
for ($xx = 0; $xx < count($longArrayPathAndName); $xx++) {
  /*split each file item according to pipe (|), to separate the filepath and filename */
  $arrFile = explode("|", $longArrayPathAndName[$xx]);
  /*Temporarily upload the file, place it in $file so we can get the file_id */
  $file = PodioFile::upload($arrFile[0], $arrFile[1]);
  /*Append the new file_id to the filearray holder */
  array_push($strAttachment, $file->file_id);
}

谢谢大家! ^ _ ^

[EDIT] 2019年11月8日

我将php文件上传到了免费的虚拟主机(000webhost)上,并且可以正常工作!我的问题是,我不想使用此免费主机,因为我已经在Netvirtue中购买了主机包。 Netvirtue是否设置了任何限制,使得PodioFileUpload无法使用?

要对其进行总结:

  1. 代码没有问题,可以在本地主机和免费主机上工作。
  2. 代码 无法在我的付费托管(Netvirtue)上运行,我不知道它是否 在其他付费托管公司上也是如此。请确认。
  3. 基于此,我假设存在一个限制Podio的设置 API将文件直接上传到我的服务器上。

0 个答案:

没有答案