Jump to content

[SOLVED] str_replace with blank characters


Recommended Posts

because it's ment to refer the user to the home page, and it is for a CMS so it has to be to there host.

BTW i can follow directions, i just decide not to follow bad ones, as i thought your code done the same as mine

http://mysite.co.uk/mysite.co.uk

Do this:

$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);

if ((substr($url, -1) == '/') || (substr($url, -1) == '\\')) {

 $url = substr($url, 0, -1);

}

$url .= '/members.php';

header("Location: $url");

exit()

 

>_> I didn't realize that's what you were doing.  Absolute URLs are better.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.