Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
<?php
function RecurseDir($it, $ende)
{
global $a;
$end = explode(",", $ende);
echo '<ul>';
for(;$it->valid();$it->next())
{
if($it->isDir() && !$it->isDot())
{
printf('<li class="dir"><b>%s</b></li>', $it->current());
if($it->hasChildren())
{
$bleh = $it->getChildren();
echo '<ul>' . RecurseDir($bleh, $ende) . '</ul>';
}
}
elseif($it->isFile())
{
$endung = substr(strrchr($it->current(), '.'), 1);
if(in_array($endung,$end))
{
$a += $dat = substr_count(trim(file_get_contents($it->getPath().'/'.$it->getFileName())),"\n")+1;
echo '<li class="file">'.$it->getFileName().' (' . $dat. ' Zeilen)</li>';
}
}
}
echo '</ul>';
}
$a = 0;
if(($dir = $_GET['dir']) == "")
die("Bitte einen Ordner angeben");
if(!isset($_GET['end']))
$end = "php,htm,html";
else
$end = $_GET['end'];
RecurseDir(new RecursiveDirectoryIterator($dir), $end);
echo "<u>Zeilen: $a</u>";
?>
Original von Kingston89
einfach in word einfügen und extras -> wörter zählen