Exec() in loop failed!

hello guys, i have a php code as below:


for ( $i=0;$i<$count;$i++)
{	
	$fh = fopen($myFile, 'w') or die("can't open file");
 	fwrite($fh, $eigenvalue[$i]);
 	fclose($fh);

	$newchk = intval($chk[$i]) ^ intval($id[$i]);

	$fh_2 = fopen($myFile_2, 'w') or die("can't open file");
 	fwrite($fh_2, $newchk);
 	fclose($fh_2);
	$fh_3 = fopen($myFile_3, 'w') or die("can't open file");
 	fwrite($fh_3, $id[$i]);
 	fclose($fh_3);
	exec('./Assign_fingerprint');
	
}


The main problem is when it comes to second loop, the exec() function didn’t work. why is that?

This your code is taking a lot of resources with multiple fopen inside a loop

Are you sure it enters the loop the second time?
And how do you know the exec isn’t executed? What does ‘./Assign_fingerprint’ do?