1? $filename = $filename; $packname = $packname; $packname = str_replace('|', '/', $packname); $fp=fopen($filename,"r+"); $counter=file($filename); $numb = $counter[0]+1; fwrite($fp,"$numb"); fclose($fp); header( "Location: $packname"); ?>