All pastes #926223 Raw Edit

Someone

public text v1 · immutable
·published 2008-03-03 16:49 UTC
rendered paste body
function recupextention ($filename)
{
	return substr(strrchr($filename, '.'), 1);
}

function listeRep($rep)
{
	if (is_dir($rep))
	{
		if ($rh = opendir($rep))
		{
			$i = 0;
			while (($file = readdir($rh)) !== false)
			{
				if ($file != '.' && $file != '..')
				{
					if (!is_dir($rep.$file))
					{
						$i++;
					}
				}
			}
		}
	}
}