Skip to content

Instantly share code, notes, and snippets.

View glubo's full-sized avatar

Petr Sýkora glubo

  • Praha, Czech Republic
View GitHub Profile
@glubo
glubo / gist:2358361
Created April 11, 2012 10:05 — forked from Majkl578/gist:2304479
Tiny php script to generate simple directory index.
#!/usr/local/bin/php
<?php
/**
* @author Michael Moravec
*/
$targetDir = $argc > 1 ? $argv[1] : getcwd();
if (!is_dir($targetDir)) throw new \InvalidArgumentException("Invalid dir '$targetDir'.");