<?php
$line1 = exec('/bin/ls updates/*', $output, $error);
while (list(,$line) = each($output)){
echo "<tr>n";
$parts = explode('/', $line);
$file = $parts[1];
$fp = fopen("htmls/".$file.".html" , 'w') or print("Cannot write $path<BR>n");
if ($fp){
fwrite($fp, "<html>n<body>n<a href=../$line>$line</a>n<br><pre>n");
$info1 = exec("/bin/rpm -qpi '$line'", $out, $errors);
while (list(,$info) = each($out)){
fwrite($fp, $info."n");
}
fwrite($fp, "</pre>n</body>n</html>");
fclose($fp);
}
echo "<a href=htmls/", $file, ".html>", $file, "</a>n";
}
if ($error){
echo "Unix error code: $error<BR>n";
exit;
}
if ($errors){
echo "Unix error code: $errors<BR>n";
exit;
}
echo "</pre>n"; ?>
|
|