All pastes #469702 Raw Edit

Header

public php v1 · immutable
·published 2007-05-03 21:14 UTC
rendered paste body
<?php$header = file_get_contents("head.txt");function recurse($dir){	if ($handle = opendir($dir)) {	    while (false !== ($file = readdir($handle))) {	        if ($file != "." && $file != "..") {				$f = "$dir/$file";	            if(is_file($f)){					$tmp = $header . file_get_contents($f);					file_put_contents($f, $tmp);				} else {					recurse($f);				}	        }	    }		closedir($handle);	}}recurse("wire");?>