mrmom Posted June 21, 2006 Share Posted June 21, 2006 Can someone take a look at this code and tell me where I'm going wrong.<?phpheader("HTTP/1.1 301 Moved Permanently");header("Location: [a href=\"http://stats.photobuz.com/awstats/awstats.pl?config=$_SERVER\" target=\"_blank\"]http://stats.photobuz.com/awstats/awstats....g=$_SERVER[/a]['HTTP_HOST']");header("Connection: close");?>I'm not very good at php.Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/12553-php-help/ Share on other sites More sharing options...
kenrbnsn Posted June 21, 2006 Share Posted June 21, 2006 Try changing this line:[code]<?phpheader("Location: http://stats.photobuz.com/awstats/awstats.pl?config=$_SERVER['HTTP_HOST']");?>[/code]to[code]<?phpheader('Location: http://stats.photobuz.com/awstats/awstats.pl?config=' . $_SERVER['HTTP_HOST']);?>[/code]or[code]<?phpheader("Location: http://stats.photobuz.com/awstats/awstats.pl?config={$_SERVER['HTTP_HOST']}");?>[/code]Ken Quote Link to comment https://forums.phpfreaks.com/topic/12553-php-help/#findComment-48095 Share on other sites More sharing options...
Buyocat Posted June 21, 2006 Share Posted June 21, 2006 It would help immensly if you told us what error you were getting, but I believe one problem is the " ... $_SERVER['blah']"I would try to separate that as follows:" ... " . $_SERVER['blah'] . " ... ";Using the . to concatenate will avoid "enclosed white space" errors. Quote Link to comment https://forums.phpfreaks.com/topic/12553-php-help/#findComment-48097 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.