Possible Duplicate:
PHP session side-effect warning with global variables as a source of dataPHP會話警告問題
我從php
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0
我相信下面的代碼創建的警告得到以下警告。
$name=$_SESSION['name'];
$emails=$_SESSION['email'];
$_SESSION['info']=array_intersect($name, $emails);
我沒有訪問php.ini
也沒有服務器。我只能改變我的代碼。 有沒有辦法刪除警告?
只是抑制錯誤是一個好主意警告你他們停止PHP ?似乎它可能會在以後再次出現。 –
@GigaWatt true。我會更新這個問題,但我只是因爲被欺騙而投票結束。 – Prisoner