2012-08-27 116 views

回答

0

我圍繞這個問題得到了通過添加腳本,每個測試(從硒IDE「開YOURDOMAIN/clear_cookies.php」呼叫)

clear_cookies.php

<?php 
if (isset($_SERVER['HTTP_COOKIE'])) { 
    $cookies = explode(';', $_SERVER['HTTP_COOKIE']); 
    foreach($cookies as $cookie) { 
     $parts = explode('=', $cookie); 
     $name = trim($parts[0]); 
     setcookie($name, '', time()-100000); 
     setcookie($name, '', time()-100000, '/'); 
     setcookie($name, '', time()-100000, '/', '.'.$_SERVER['HTTP_HOST']); 
    } 
}