This script is supposed to take a file and rename it to plus 1 to its file name , it works but then it stops at 1000, it doesnt crash ro timeout, its as if it finnished, but accordinmg to my loop, I want it to go till 10,000. Help plz Is it my php or apache fault or is it the scripts?
<?
$file="00001.php";
echo $file."<br>";
$new_file=$file;
for($i=0; $i<10000; $i++)
{
$new_file = "00000".(substr($new_file,2,5)+1);
$new_file = "".substr($new_file,strlen($new_file)-5,5).".php";
copy($file,$new_file);
}
?>