douzi6060 2010-10-18 08:39
浏览 184
已采纳

通过PHP从SVN更新文件

I have an issue with accessing an HTML file in an SVN repository. Its contents are displayed as plain text.

What I would like to do is to link to that always up-to-date file from an external website, but I'd like the HTML file to simply launch in the browser (it's a TiddlyWiki file, rather unreadable for human beings in raw text form).

My idea is to simply grab the latest revision of the file and copy it over to my server so that it's accessible as a normal HTML file. Is there a way to easily do that using a PHP script? If there are more than one way, what would you recommend?

If it helps to know it, my server does not have SVN and I have no possibility to install it (it's a shared host).

  • 写回答

2条回答 默认 最新

  • duanhuan3705 2010-10-18 08:50
    关注

    Check if the Subversion module is available on your server. If that's the case, you can easily create some script that connects to the SVN server and gets the newest file.

    If you don't have that module, I can think of two possibilities:

    1. If your SVN server has some kind of web interface, you could simply do a HTML download from the web interface. Depending on the kind of web interface, you might need to extract the file's source out first.
    2. You can also add a postcommit hook to the SVN server that uploads the file to your website; but given that this requires you to change the SVN server's configuration and also puts a direct connection to your website, it might not be what you want.
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 cplex运行后参数报错是为什么
  • ¥15 之前不小心删了pycharm的文件,后面重新安装之后软件打不开了
  • ¥15 vue3获取动态宽度,刷新后动态宽度值为0
  • ¥15 升腾威讯云桌面V2.0.0摄像头问题
  • ¥15 关于Python的会计设计
  • ¥15 聚类分析 设计k-均值算法分类器,对一组二维模式向量进行分类。
  • ¥15 stm32c8t6工程,使用hal库
  • ¥15 找能接spark如图片的,可议价
  • ¥15 关于#单片机#的问题,请各位专家解答!
  • ¥15 博通raid 的写入速度很高也很低