proper way to strip backslashes from url
Posted on 2009-07-01
I need to know a proper, secure, and proficient way to strip not only front slashes but backslashes as well from a url.
the current code im working with is
define('DOMAIN', rtrim(rtrim($_SERVER['HTTP_HOST'], '/') . dirname($_SERVER['PHP_SELF']), '/'));
but it does not strip backslashes which might appear on wamp setups (windows systems)