Dempsey gave me this script to show how many soundpacks are in my soundpacks folder (on the site):
function count_files( $dir )
{
$retval = 0;
if( $dir && is_dir( $dir ) )
{
if( ($d = opendir( $dir )) !== false )
{
while( ($f = readdir( $d )) !== false )
{
if( is_file( $dir . "/" . $f ) ) ++$retval;
}
closedir( $d );
}
}
return $retval;
}
print count_files( "/soundpacks" );
I firstly dont get how to use php
and how to add it to my homepage.
Please, please help me