据我所知,我无法将其正确放入表结构中,但所有编码都是正确的,但由于某种原因它无法正常工作。
这是我的代码:
<?php
echo "<table class='array'>
<tr><th> Employee </th>
<th>In Que </th>
<th>Incomplete </th>
<th>Processed </th></tr>";
$count_result=array();
$path = "Users";
$folders = @scandir("$path");
if ($folders) {
foreach ($folders as $item) {
$count = 0;
if ((substr($item, 0, 1) == '.') || (preg_match("/\.php$/", $item)))
continue;
if (is_dir($path . "/" . $item)) {
$target_folders = @scandir($path . "/" . $item . "/uploaded/");
if ($target_folders) {
foreach ($target_folders as $target_item) {
if ((substr($target_item, 0, 1) == '.') || is_dir("$path/$item/uploaded/$target_item"))
continue;
$count++;
}
}
$count_result[$item]=$count;
}
echo "<tr><td><div class='data'>" .$item."
</div></td>";
echo "<td><div class='data1'>" .$count."
</div></td>";
}
}
?>
<?php
$counta_result=array();
$path = "Users";
$foldersa = @scandir("$path");
if ($foldersa) {
foreach ($foldersa as $itema) {
$counta = 0;
if ((substr($itema, 0, 1) == '.') || (preg_match("/\.php$/", $itema)))
continue;
if (is_dir($path . "/" . $itema)) {
$target_foldersa = @scandir($path . "/" . $itema . "/incomplete/");
if ($target_foldersa) {
foreach ($target_foldersa as $target_itema) {
if ((substr($target_itema, 0, 1) == '.') || is_dir("$path/$itema/uploaded/$target_itema"))
continue;
$counta++;
}
}
$counta_result[$itema]=$counta;
}
echo "<td><div class='data2'>" .$counta."</div></td>";
}
}
?>
<?php
$countb_result=array();
$path = "Users";
$foldersb = @scandir("$path");
if ($foldersb) {
foreach ($foldersb as $itemb) {
$countb = 0;
if ((substr($itemb, 0, 1) == '.') || (preg_match("/\.php$/", $itemb)))
continue;
if (is_dir($path . "/" . $itemb)) {
$target_foldersb = @scandir($path . "/" . $itemb . "/processed/");
if ($target_foldersb) {
foreach ($target_foldersb as $target_itemb) {
if ((substr($target_itemb, 0, 1) == '.') || is_dir("$path/$itemb/processed/$target_itemb"))
continue;
$countb++;
}
}
$countb_result[$itemb]=$countb;
}
echo "<td><div class='data3'>" .$countb."</div></td></tr>";
}
}
?>
</table>