我上传到FTP后出现此错误,
严格标准:只应在第15行的/home/user/public_html/ref/hhhhh_hhhhh/index.php
中通过引用传递变量
知道什么是错的吗?
<?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' => 'test@test.test',
)
);
$cid = "infod";
$site_url = $cid.".pokemon.com";
header("Location: http://$site_url") ;
}
?>
答案 0 :(得分:2)
$result = $client->add_contact(
$api_key,
array (
'campaign' => $CAMPAIGN_ID,
'name' => 'Test',
'email' => 'test@test.test',
)
); /* <- missed the ";" */
答案 1 :(得分:0)
尝试更改
$CAMPAIGN_ID = array_pop(array_keys($campaigns));
到
$CAMPAIGN_ID = array_keys($campaigns);
$CAMPAIGN_ID = array_pop($CAMPAIGN_ID);
看看它是否有帮助。