duan2477 2013-06-10 10:45
浏览 31
已采纳

如何在分布式应用程序上处理文件上载?

I have photo uploading functionality in web application using PHP. Which is going to host as distributed application on many servers.

Now, problem is how should I handle that photo uploading functionality so, that photo can be available on all server? My application is in php.

  • 写回答

1条回答 默认 最新

  • douxun4924 2013-06-10 11:46
    关注

    You could use an already existing platform to perform syncing. Most modern OSes support syncing, and you could also use external tools.

    At the OS level:

    • You can use rsync for *nix servers (plus, this has been ported to Windows too)
    • Here's a way to do it between Windows servers

    Using external tools:

    Using PHP:

    • You could use librsync
    • You could add an FTP/SSH server to each one of your distributed servers. Once a file is uploaded to one server, it can be uploaded via FTP to the others. PHP includes functionality for FTP - check the FTP section in the PHP handbook.
    • Use FXP to transfer files between servers. The KioobFTP class can be used for this, as it implements FXP transfers
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程