dsyk33753 2014-12-22 08:05
浏览 42
已采纳

svn日志输出没有在php页面的浏览器中显示

I have a query in my php page, Could you please help me to resolve that. In php page i want to do SVN list of the repo, so i written the code as below.

page name: svn_list.php

<?php
$cmd = '/usr/bin/svn list repo_name';
exec($cmd, $output);
$output = implode("
", $output) . "
";
echo $output;
?>

If i run this script in putty by giving command "php svn_list.php" is working fine. it list out the files. but i want to see this output in browser. If i open the php file in browser it shows empty. Even i tried with using following PHP header at the top of the PHP Code, eventhough it's not displaying. Please help me on this.

header('Content-type: text/html; charset=utf-8');

Thanks in advance.

  • 写回答

2条回答 默认 最新

  • dqxsuig64994 2014-12-22 08:37
    关注

    The problem , here , to me seems to be with the user level access.

    Not sure but you might have checked the script in cli with the user (may be a root user) who has the privilege of running the svn list command and hence must be giving the result and the user (for Apache which might be running as user www-data and group www-data or as user apache and group apache) might not have that permission for running the svn list command.

    Try checking the permission level. http://fideloper.com/user-group-permissions-chmod-apache

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

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