Server : Apache System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64 User : apache ( 48) PHP Version : 8.0.28 Disable Function : NONE Directory : /var/www/html/venkat/check1-june-2016/ |
<?php
$section1 = "sec_cdec.txt";
$result = shell_exec("cat $section1");
$result = explode("\n", $result);
$i = 0;
$j = 0;
echo "------------------------------------------------------------------<br>";
while ($result[$i]) {
$result1 =explode('|', $result[$i]);
//echo $result1[5].'j';
if ($result1[5] == " Correct "){
$v = htmlspecialchars(shell_exec("cat file/sec_c/$result1[0]"));
echo "<b>".$result1[0]."</b><br>";
echo "<pre>".$v."</pre>";
echo "<br>--------------------------------------------------------<br>";
$j++;
}
$i++;
if($j == 6){
break;
}
}
?>