Jump to content

Archived

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

mrmom

PHP Help

Recommended Posts

Can someone take a look at this code and tell me where I'm going wrong.

<?php
header("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.

Share this post


Link to post
Share on other sites
Try changing this line:
[code]<?php
header("Location: http://stats.photobuz.com/awstats/awstats.pl?config=$_SERVER['HTTP_HOST']");
?>[/code]
to
[code]<?php
header('Location: http://stats.photobuz.com/awstats/awstats.pl?config=' . $_SERVER['HTTP_HOST']);
?>[/code]
or
[code]<?php
header("Location: http://stats.photobuz.com/awstats/awstats.pl?config={$_SERVER['HTTP_HOST']}");
?>[/code]

Ken

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

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.