Home >Backend Development >PHP Tutorial >关于简单化代码。求大神指导

关于简单化代码。求大神指导

WBOY
WBOYOriginal
2016-06-13 11:41:43830browse

关于简化代码。求大神指导
混迹csdn有半个月了。收获不少,想在这里安家了
喜欢这里的氛围,喜欢这里的大神

if(empty($grouptypeid)){<br />		ShowMsg('请指定所属考试!', '-1');<br />        exit();<br />	}if(empty($content)){<br />	    ShowMsg('内容不能为空!','-1');<br />		exit();<br />	}if(empty($teachername)){<br />	    ShowMsg('请选择教师!','-1');<br />		exit();<br />	}if(empty($years)){<br />	    ShowMsg('请选择日期','-1');<br />		exit();<br />	}if(empty($isupdate)){<br />	    ShowMsg('请选择更新日期','-1');<br />		exit();<br />	}
这要怎么写才简单呢?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn