Jump to content


Photo

PHP Help


  • Please log in to reply
2 replies to this topic

#1 mrmom

mrmom
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 21 June 2006 - 03:51 PM

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.

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 21 June 2006 - 03:56 PM

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

Ken

#3 Buyocat

Buyocat
  • Members
  • PipPipPip
  • Advanced Member
  • 267 posts

Posted 21 June 2006 - 03:58 PM

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.
Looking for some easy-to-use tools?  Try these, https://sourceforge....jects/utils-php -- I made them myself.  They're distinct tools which are easy to understand and use.  See some examples uses at http://www.anotherearlymorning.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users