Skip to content

Instantly share code, notes, and snippets.


Roman Ožana OzzyCzech

View GitHub Profile
View get_daterange_timestamps.php
* Generates timestamp bounderies for the passed date range name.
* @param string $range Date range name.
* @return array
function get_daterange_timestamps($range)
OzzyCzech / normalise-path.php
Created Aug 25, 2012 — forked from thsutton/normalise-path.php
Normalise paths in PHP
View normalise-path.php
* Normalise a file path string so that it can be checked safely.
* Attempt to avoid invalid encoding bugs by transcoding the path. Then
* remove any unnecessary path components including '.', '..' and ''.
* @param $path string
* The path to normalise.
* @param $encoding string