照片上传无法直接从服务器/URL 工作,即在 PHP 中的 Flickr 上使用 cronjob

发布于 2024-12-29 07:34:53 字数 265 浏览 5 评论 0原文

我们网站的身份验证工作正常,当我使用 PHP 中的 async_upload 从临时文件上传到 Flickr 时,

它也工作正常。

但是,当我们在 PHP 中使用 cronjob 上传照片时,即当我们尝试直接从服务器或使用 URL 上传照片时,它不会使用 async_upload() 上传任何照片或PHP 中的 sync_upload()

我需要你的手, 谢谢

Authentication with our site is working fine and also when I upload on Flickr from temporary file using async_upload in PHP,

It's working fine.

But, When we upload photo with cronjob in PHP i.e. when we try to upload photo from server directly or using URL, It doesn't upload any photo using async_upload() or sync_upload() in PHP.

I need your hand,
Thank You

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

云巢 2025-01-05 07:34:53

您是否确定将目录更改为您的主目录/或文件所在的特定目录?这是从 cronjob 运行时常见的错误之一。您可以更改为所需的目录并执行 cronjob php 文件,例如

* * * * * cd /home/dir; php upload.php

或在 PHP 文件中执行“chdir('/home/dir')”。

Did you make sure to change your directory to your home / or the specific directory your files exist? That's one of the common mistakes while running from a cronjob. Either you change to the directory required and execute the cronjob php file like

* * * * * cd /home/dir; php upload.php

Or execute "chdir('/home/dir')" inside your PHP file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文