Comment detail

条件を満たす行を取り除く (Nested Flatten)
PHP4以下なら普通にfopenとかで
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<?php
function removeComment($infile, $outfile, $startwith ='#') {
    $r = "";
    foreach(file($infile) as $line) {
        if (strncmp($line, $startwith, strlen($startwith))) {
            $r .= $line;
        }
    }
    file_put_contents($outfile, $r);
}

Index

Feed

Other

Link

Pathtraq

loading...