<?php
phpinfo();
die;
function createDir($file){
    $dir = dirname($file);
    if(!is_dir($dir)){
        mkdir($dir, 0777, true);
    }
}
$date = date('Ymd'); 
$h = date('H');
$scpScriptPath = __DIR__ . '/test.sh';
$successLog = "/mnt2/wwwroot/crazy_god_CMS/deBUG/syncBundles/success/{$date}/{$h}.log";
$errorLog = "/mnt2/wwwroot/crazy_god_CMS/deBUG/syncBundles/error/{$date}/{$h}.log";
createDir($successLog);
createDir($errorLog);
$cmd = "{$scpScriptPath} 1>> {$successLog}  2>> {$errorLog}";
echo $cmd;
