爲了調試這一點,你將需要利用print_r()
,這樣就可以看到你的對象或數組的內容:
// see what $userdata contains - update your question with the results of the line below
echo '<div style="background-color:white; padding:15px;"><pre>'.print_r($userdata, true).'</pre></div>';
// see what $userdata->yim contains - update your question with the results of the line below as well
echo '<div style="background-color:white; padding:15px;"><pre>'.print_r($userdata->yim, true).'</pre></div>';
if(strlen($userdata->yim['text']) > 2 && !isset($_POST['step1']))
{
$GLOBALS['error'] = 1;
$GLOBALS['error_type'] = "tip";
$GLOBALS['error_msg'] = $userdata->yim['text'];
}
謝謝你的提示答案,但正如我所說的,我不知道如何要做到這一點。我的開發人員給我留下了一些錯誤來解決問題,我不知道我在做什麼。 –
它是什麼?是「if」語句還是最後一行? – putvande
這是代碼行91. –