I need to URL encode just the directory path and file name of a URL using PHP.
So I want to encode something like http://example.com/file name and have it r
http://example.com/file name
I think this function ok:
function newUrlEncode ($url) { return str_replace(array('%3A', '%2F'), '/', urlencode($url)); }