字符A($service[1][cmdkey]=='A')怎么可能作为pattern????没有定界符

解决方案 »

  1.   

    'cmdkey' => '/^[0-9]{8}$/',   对的
    'numkey' => 123456,           错
    'cmd_match' => 1,             错
    'num_match' => 1,             错
      

  2.   

    提示是限定符必需为字每或斜杠
    $service[] = array(
    'cmdkey' => 'A',
    'numkey' => '1234',
    'cmd_match' => 1, 
    'num_match' => 1, 
    );
    改为
    $service[] = array(
    'cmdkey' => '/A/',
    'numkey' => '1234',
    'cmd_match' => 1, 
    'num_match' => 1, 
    );
    就对了