SVN PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

I'm trying to access SVN from PHP and as there seems to be no direct binding 
for it yet i've had a look at WebSVN source to try and list directories in a 
repository with the following code but it just doesn't return anything.  It 
doesn't return anything whether re-directing or not (i..e. using >2&1).

If I use the same method to call "svnlook author", etc. it work fine, the 
only problem is when using the "svn" command line program.

        $output = array ();
        $err = false;

        $cmd = "svn info http://172.16.0.32/svn/java/trunk >2&1";

        if ($handle = popen($cmd, "r"))
        {
                $firstline = true;
                while(!feof($handle))
                {
                   $line = fgets($handle);

                   if($firstline && $line == "")
                   {
                      $err = true;
                   }
                   $firstline = false;
                   $output[] = rtrim($line);
                }

                pclose($handle);

                if(!$err)
                    print $output;
        }

Any help would be appreciated.

Cheers,

J.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux