2010-09-29 51 views
0

我在这里遇到了这个PHP URL旋转脚本(http://motiongroove.com/2010/03/03/free-php-url-rotator-script/),但由于某些原因,该死的东西,一直给我这个错误:请指教PHP脚本问题

致命错误:调用未定义功能SSET()在/servername/index.php第4行

这是我收到的代码:

<?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); } ?> 

谢谢!

+0

我怀疑你错过了我让isset() – GlenCrawford 2010-09-29 05:20:12

回答

2

大概应该是isset(),不sset()

即:

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

在第四行的开头。

我相信COOKIE必须是$ HTTP_COOKIE_VARS中的大写字母。

+0

谢谢大家的帮助!对此,我真的非常感激。 – Eric 2010-09-29 05:30:10