第一個錯誤的錯誤:嚴格的標準:只有變量應該通過參考/home/user/public_html/ref/hhhhh_hhhhh/index.php第15行遇到了下列行
通過點擊提交按鈕後:
警告:無法修改標頭信息 - /home/user/public_html/ref/hhhhh_hhhhh/index.php中已由(位於/home/user/public_html/ref/hhhhh_hhhhh/index.php:3處開始的輸出)發送的標頭在線28
<?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") ;
}
?>
由於'E_STRICT'是您的默認'error_reporting'的一部分,因此您需要將php.ini修改爲error_reporting = E_ALL&〜E_NOTICE&〜E_STRICT'以進行錯誤報告。 – Ohgodwhy
@Ohgodwhy,好吧,我模糊了那部分。你有回答@。@? – user3546239
我剛纔說什麼答案是解決嚴格的標準。你的'不能修改標題信息'是因爲你的空白空間被返回到某處的瀏覽器,並且導致了這種情況。 – Ohgodwhy