2013-07-05 3 views
1

을 먼저 꺼내십시오.이 질문이 매우 기본적인/중복이면 죄송합니다. 나는 PHP 경험이없고 프로그래밍 경험이 없다. 모든 나는 필요 - 그들은 정말 아주 간단있어, http://www.jim.am/rotating-offer-pages-and-landing-pages-in-prosper202/PHP를 작동하는 데 문제가 생기면

내가 사이트의 지침에 따라 :

기본적으로, 내가 뭘하려고 여기에 제공되는 회전 스크립트를 사용하다 해야 할 일은 내 링크를 전환하는 것입니다.

그러나 "rotate.php? kw ="링크를 클릭하면 단지 빈 페이지 인 페이지로 이동합니다. 회전하는 스크립트가 어떤 이유로 작동하지 않는 것 같습니다.

그래서 저는 PHP에 익숙한 사람이 코드 (위 링크에 링크되어 있음)를 한 눈에 볼 수 있기를 바랍니다. 그것의 단지 15 라인의 코드는 ...

고마워!

편집 :

http://test.p2track.com/rotate.php?kw=test123

내 코드는 다음과 같습니다 :

<?php 
if ($_GET['kw']) { 
$kw = strip_tags($_GET['kw']); 
} else { $kw = ‘jimrocks’; } 
$landingpages = array(
// paste as many tracking links as you like below 
// copy and paste the whole line and put the link between the ‘ and the ‘ 
‘http://be2canada.struenet.com/RuleLP/?t202id=3109&t202kw=’.$kw, 
‘http://be2canada.struenet.com/RegLP/?t202id=8115&t202kw='.$kw, 
); 
$searchlink = $landingpages[array_rand($landingpages)]; 
header(“HTTP/1.1 301 Moved Permanently”); 
header(“Location: $searchlink”); 
exit(); 
?> 

OK - 내 새로운 코드 : 여기

가 회전에서 내 시도에 대한 링크입니다

<?php 
if ($_GET['kw']) { 
$kw = strip_tags($_GET['kw']); 
} else { $kw = ‘jimrocks’; } 
$landingpages = array(
// paste as many tracking links as you like below 
// copy and paste the whole line and put the link between the ‘ and the ‘ 
'http://be2canada.struenet.com/RuleLP/?t202id=3109&t202kw='.$kw, 
'http://be2canada.struenet.com/RegLP/?t202id=8115&t202kw='.$kw, 
); 
$searchlink = $landingpages[array_rand($landingpages)]; 
header(“HTTP/1.1 301 Moved Permanently”); 
header(“Location: $searchlink”); 
exit(); 
?> 
+0

링크가 블로그 게시물이 아니라 코드로 이동합니다. – Barmar

+0

코드 및 오류 메시지 (있는 경우)를 게시하십시오. 그것없이 우리는 당신이 뭘 잘못하고 있는지 알 수 없습니다. – bansi

+0

OK - 여기 내 코드는 다음과 같습니다. 편집 : 제대로 포맷하는 것이 정말 어렵습니다 ...아픈 편집 내 OP – DeHustle

답변

1

어딘가에 PHP 코드의 구문 오류가 있어야합니다.

EDIT (어떤이있는 경우) 오류 메시지를 제공하시기 바랍니다보다

error_reporting(E_ALL); 
ini_set('display_errors', 1); 

:

당신의 PHP 스크립트의 상단이 추가 오른쪽, 당신은 당신의 연결에 구문 오류가 있습니다

‘http://be2canada.struenet.com/RuleLP/?t202id=3109&t202kw=’.$kw, 
‘http://be2canada.struenet.com/RegLP/?t202id=8115&t202kw='.$kw, 

변경이 아포스트로피 '이것'

'http://be2canada.struenet.com/RuleLP/?t202id=3109&t202kw='.$kw, 
'http://be2canada.struenet.com/RegLP/?t202id=8115&t202kw='.$kw, 
012 3,516,

은 "이것"이 따옴표를 변경

header("HTTP/1.1 301 Moved Permanently"); 
header("Location: $searchlink"); 

에도 유래의 코드 하이 라이터 따라 '' 또는 ""에게 그것은

+1

오류 메시지가 표시되고 작성자가 혼자서 고칠 수 있다면 어떨까요? – WooDzu

+0

코드를 수정했지만 여전히 작동하지 않는 것 같습니다. 새 코드가 어떻게 OP에 표시되는지 알려 드리겠습니다. – DeHustle

+0

큰 따옴표에도 문제가 있습니다. 위를보십시오 – WooDzu

0

변경 ‘’“”를 발견했습니다.

어딘가에서 코드 복사 붙여 넣기처럼 보입니다.

+0

BAM 작동합니다! 고맙습니다! – DeHustle

+0

@ user1526218 알아두면 좋은 점은 .. cheers !!!! – swapnesh

관련 문제