/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function normalize_path($path, $with_slash = true) { if($path[0] == DIRECTORY_SEPARATOR) if($with_slash) return $path; else if($with_slash) return DIRECTORY_SEPARATOR.$path; else return $path; }
Comments
