UNB Components Code Reference

UnbDebug::TrimFilename method

Trims path levels outside of this webspace directory from a file name.

public static function UnbDebug::TrimFilename ($fileName);

Parameters

fileName

(string) Rooted file name to be trimmed. Relative (non-rooted) file names will not work!

Return value

(string) File name relative to this webspace's document root.

Remarks

This makes a file name shorter, more relevant and doesn't reveal the absolute path on the web server should it be displayed to the public.

Member of class: UnbDebug

Implementation file: unb.class.php, line 111

© 2011 Yves Goergen. UNB Components Homepage. Reference generated on 2011-02-22.