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 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建