2010-09-29 55 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