imageshack api 问题。 不会上传我的图片
我只是想知道是否有人使用过 imageshack api,因为我正在尝试使用它,但我遇到了一些问题,因为它失败了并且不会上传我的图像。
image shack 的 php 库可以在这里找到 http://elliottback.com/wp/using-the-imageshack-xml -api/
我将 for file 元素传递给上传函数,但它只是不想这样做。 有人有任何想法或任何有用帮助的链接吗? 干杯 标记
I was just wondering if anyone has used the imageshack api as i am trying to use it and i am having some issues as it just fails and will no upload my image.
the php library for image shack can be found here
http://elliottback.com/wp/using-the-imageshack-xml-api/
i pass the for file element to the upload function but it just does not want to do it. does anyone have any ideas or any links with useful help?
Cheers
Mark
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没关系,这是我犯的一个愚蠢的错误,并向
我正在做的 课程发送了错误的信息
$_FILES['file']['name']
而不是正确的方式,
在我更改后$_FILES['file']['tmp_name']
没问题
It is fine it was a silly mistake i was making and sending the wrong information to the class
i was doing
$_FILES['file']['name']
instead of the correct way which was
$_FILES['file']['tmp_name']
after i change that it was fine
根据API类代码,第15行:
设置cURL函数的最大执行时间为240秒(4分钟)。
这可能是可能的错误。 尝试将该值设置为 600 秒(10 分钟),然后重试。
此外,上传文件所需的时间取决于文件大小和互联网的上传速度。
另外,向我们展示您正在使用的代码(除了该类之外)将是一个巨大的帮助。
According to the API class code, the line 15:
sets a maximum execution time for the cURL functions of 240 seconds (4 minutes).
That could be the possible error. Try setting that value to 600 seconds (10 minutes) and try again.
Also, the time needed to upload the file depends on the file size and on your internet's upload speed.
Also, showing us the code that you are using (besides that class) would be a HUGE help.