コード例 #1
0
ファイル: storeinc.php プロジェクト: jtauthor/mt
function doInc($fullFile, $oldFile, $isFull, $chunkSize)
{
    $dUtil = new DiffUtil();
    //echo("isFull::$isFull\n");
    if ($isFull) {
        if (file_exists($fullFile)) {
            $content = $dUtil->readFile($fullFile);
            echo $content;
        } else {
            header('HTTP/1.1 404 Not Found');
            echo "not found!";
        }
    } else {
        if (file_exists($fullFile)) {
            $resultFile = $dUtil->makeIncDataFromFile($oldFile, $fullFile, $chunkSize);
            //var_dump($resultFile);
            $content = json_encode($resultFile);
            echo $content;
        } else {
            header('HTTP/1.1 404 Not Found');
            echo "not found!";
        }
    }
}