今天遇到了phpweb商城模块发送的时候,电脑死机情况。 最终研究发现 是由于以下代码引起的:
if ( $memberprice != "" && is_array( $memberprice ) )
{
while ( list( $key, $val ) = $key ) // 原来是 while ( list( $key, $val ) = key )
{
$msql->query( "select id from {P}_shop_memberprice where `membertypeid`='{$key}' and `gid`='{$id}' limit 0,1" );
if ( $msql->next_record( ) )
{
$fsql->query( "update {P}_shop_memberprice set `price`='{$val}' where `membertypeid`='{$key}' and `gid`='{$id}'" );
}
else
{
$fsql->query( "insert into {P}_shop_memberprice set `price`='{$val}',`membertypeid`='{$key}',`gid`='{$id}'" );
}
}
}