if ($_SERVER['SCRIPT_NAME'] == "ruta/carpetasinsession/archivo.php") session_destroy(); // o $_SESSION['variable'] = ""