开发者

Please Advise PHP Script issue

I came across this PHP URL Rotator Script here (http://motiongro开发者_C百科ove.com/2010/03/03/free-php-url-rotator-script/), but for some reason, the damn thing keeps giving me this error:

Fatal error: Call to undefined function sset() in /servername/index.php on line 4

This is the Code I received:

<?php $link[1] = "http://yourdomain.com/index1.html";
$link[2] = "http://yourdomain.com/index2.html";
$link[3] = "http://yourdomain.com/index3.html";
if(!sset($HTTP_cookie_VARS['link'])){ $n=count($link); 
$rand=rand(1,$n); setcookie("link",$rand,time()+3600);
header('location:'.$link[$rand]); }else{ $go=$link[$_COOKIE['link']]; header('location:'.$go); } ?>

Thank you!


Should probably be isset(), not sset()

That is:

if(!isset($HTTP_COOKIE_VARS['link']))

at the beginning of the fourth line.

And I believe COOKIE has to be upper case in $HTTP_COOKIE_VARS.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜