Skip to content

Instantly share code, notes, and snippets.

@sekrett
Created January 31, 2011 16:32
Show Gist options
  • Select an option

  • Save sekrett/804312 to your computer and use it in GitHub Desktop.

Select an option

Save sekrett/804312 to your computer and use it in GitHub Desktop.

Revisions

  1. Alexander Zubkov created this gist Jan 31, 2011.
    3 changes: 3 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    $dir1 = sprintf("%04d", (int) ($id / 1000000));
    $dir2 = sprintf("%03d", (int) (($id % 1000000) / 1000));
    $dir3 = sprintf("%03d", (int) ($id % 1000));