Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (14 sloc) 613 Bytes
<?php
$files = range( 1, 100000 );
$run_file = [ '<?php', 'echo "Starting";', 'echo PHP_EOL;' ];
foreach( $files as $file ){
$dir = '<?php return __DIR__;';
$dirname = '<?php return dirname( __FILE__ );';
file_put_contents( './script/dir/' . $file . '.php', $dir );
file_put_contents( './script/dirname/' . $file . '.php', $dirname );
$run_file[] = 'require( "' . $file . '.php" );';
}
$run_file[] = 'echo "done";';
$run_file[] = 'echo PHP_EOL; ';
file_put_contents( './script/dir/run.php', implode( $run_file, "\n" ) ) ;
file_put_contents( './script/dirname/run.php', implode( $run_file, "\n" ) ) ;
You can’t perform that action at this time.