[ create a new paste ] login | about

Link: http://codepad.org/Glke3Ayx    [ raw code | fork ]

PHP, pasted on Oct 31:
<?php

define('BASE_DIR', __DIR__);

function print_files($dir)
{
	$files = scandir($dir);
	foreach ($files as $file)
	{
		if (($file !== '.') AND ($file !== '..'))
		{
			if (is_dir($dir . '/' . $file))
			{
				print_files($dir . '/' . $file);
			}
			else
			{
				$filename = str_replace(BASE_DIR, 'PHPExcel', $dir . '/' . $file);
				echo "\t\t<files>{$filename}</files>\n";
			}
		}
	}
}

$dir = BASE_DIR;
print_files($dir);
?>


Create a new paste based on this one


Comments: