设为首页收藏本站
开启辅助访问
切换到宽版

创星网络[分享知识 传递快乐]

 找回密码
 立即注册

QQ登录

只需一步,快速开始

用新浪微博登录

只需一步,快速搞定

搜索
查看: 3571|回复: 0
打印 上一主题 下一主题

PHP通过浏览器执行SVN UP代码到服务器

[复制链接]

我玩的应用:

跳转到指定楼层
楼主
发表于 2012-10-12 05:46:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
部分代码:
  1. $arg_file = '/var/args';
  2. function update($file)
  3. {
  4.         global $svn_user,$svn_pass,$arg_file;
  5.         exec("svn up --username $svn_user --password $svn_pass $file 2>&1 <$arg_file", $output);
  6.         echo "更新成功的列表";
  7.         echo "<pre>";
  8.         foreach ($output as $val) {
  9.                 printf($val);
  10.                 echo "
  11. ";
  12.         }
  13.         echo "</pre>";
  14.         submit($_POST['file']);
  15. }
复制代码
主要功能:
        1.带登录认证,支持多用户
        2. 检查修改过或存在或已冲突的文件,防止更新产生冲突
        问题解答:
  1. 1.You can avoid future appearances of this warning by setting the value
  2. of the 'store-plaintext-passwords' option to either 'yes' or 'no'
复制代码
修改/etc/subversion/servers在globals段里添加一行
        store-plaintext-passwords = yes
        2.如提示.svn文件夹没有写权限,请使用chmod赋予权限。
        3. /var/args文件需要手动创建,如有需要也可改为其它路径。
        参考:
        http://blog.s135.com/post/371/
        http://koda.iteye.com/blog/1086240
svnup.111018.rar(1.64 K)

from:http://blog.linuxphp.org/archives/1375/
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 转播转播 分享分享 分享淘帖
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|创星网络 ( 苏ICP备11027519号|网站地图  

GMT+8, 2024-9-22 07:16 , Processed in 0.083984 second(s), 22 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表