Jump to content

PHP Help


mrmom

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.