Return to Snippet

Revision: 15687
at July 13, 2009 16:55 by philokezzar


Initial Code
// http://www.fordnox.com/blog/2008/11/simple-svn-checkout-using-php/

 $username = "username";
 $password = "password";
 $repository = "http://google-web-toolkit.googlecode.com/svn/trunk/";
 $destination = ‘your/full/path’;
 
 $checkout = "svn export –force –username $username –password $password $repository $destination";
 $result = _exec($checkout);
 
function _exec($cmd)
{
    if (substr(php_uname(), 0, 7) == "Windows") {
        pclose(popen("start /B ". $cmd, "r"));
    } else {
        exec($cmd . " > /dev/null &");  
    }
}

Initial URL


Initial Description


Initial Title
Simple SVN checkout using PHP

Initial Tags
php, textmate

Initial Language
Other