如何将会话存储在数据库中?我是用这个代码做的:
function write ($session_id, $session_data)
// write session data to the database.
{
if (!empty($this->fieldarray)) {
if ($this->fieldarray['session_id'] != $session_id) {
// user is starting a new session with previous data
我做了一些搜索,但没有找到我需要的答案。我正在尝试编写一个使用一系列宏的程序,但它一直显示无法运行宏错误(1004)。在任何人询问之前,我检查了一下,是的,宏在模块中并且宏被启用。由于这些似乎是最常见的原因,我想我现在应该把它们去掉。
下面是调用宏的代码:
Sub CreateDeratings()
Application.ScreenUpdating = False 'disable screen updating until the whole process is done.
Application.Run ("OpenFile")
我像这样创建了两个数组:
public int GameBoard[][] = new int[30][14];
public int DirectionMap[][] = new int[30][14];
然后,我像这样初始化数组:
for (int i = 0; i < GameBoard.length; i++)
{
for (int j = 0; j < GameBoard[i].length; j++)
{
GameBoard[i][j] = 0;
}
}
... //Same for DirectionMap
当我运行函数时:
嘿!我想创建一个字段数组。然而,我的代码返回以下错误:字段'WindowsFormsApplication1.Form1.fieldArray‘从未被赋值,并且将始终具有其缺省值null。
对如何解决这个错误有什么建议吗?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;