$_nmsg='';//在for循环前面加上 你没定义就.= 会出警告的或者 在header前面加 ob_clean();生成验证码最好都clean一下
Chrome的话使用view-source:查看源码,应该有错误