2014-04-17 38 views
1

我當我把它上傳到FTP這個錯誤, 嚴格的標準:只有變量應該通過參考/home/user/public_html/ref/hhhhh_hhhhh/index.php第15行有問題與線

任何想法有什麼錯過去了?

<?php  
require_once 'jsonRPCClient.php'; 
$api_key = 'apikey'; 
$api_url = 'url'; 
$client = new jsonRPCClient($api_url); 
$campaigns = $client->get_campaigns(
    $api_key, 
    array (
     # find by name literally 
     'name' => array ('EQUALS' => 'test') 
    ) 
); 
$CAMPAIGN_ID = array_pop(array_keys($campaigns)); 
if(isset($_POST['submit'])) 
{ 
    $result = $client->add_contact(
    $api_key, 
    array (
     'campaign' => $CAMPAIGN_ID, 
     'name'  => 'Test', 
     'email'  => '[email protected]', 
    ) 
    ); 
$cid = "infod"; 
$site_url = $cid.".pokemon.com";  
header("Location: http://$site_url") ; 
} 

?> 
+0

你的問題的主題並不真正有建設性。 – jdepypere

回答

2
$result = $client->add_contact(
$api_key, 
array (
    'campaign' => $CAMPAIGN_ID, 
    'name'  => 'Test', 
    'email'  => '[email protected]', 
) 
); /* <- missed the ";" */ 
+0

現在我有這個錯誤: 嚴格的標準:只有變量應通過引用傳遞給/home/user/public_html/ref/hhhhh_hhhhh/index.php 15行 – user3546239

0

嘗試改變

$CAMPAIGN_ID = array_pop(array_keys($campaigns)); 

$CAMPAIGN_ID = array_keys($campaigns); 
$CAMPAIGN_ID = array_pop($CAMPAIGN_ID); 

,並看看是否有幫助。