Home  >  Article  >  Backend Development  >  exit功用真的这么大吗

exit功用真的这么大吗

WBOY
WBOYOriginal
2016-06-13 11:43:421322browse

exit作用真的这么大吗?
正在编一个仓库管理系统。。入库没问题。。出库的时候。。
首先判定够不够,要是不够就
echo"<script>alert('此仓库没有这么多货物!!');history.go(-1);;</script>";

要是够的话后面就insert update。本来觉得跳转就已经可以防止后面insert update了,但是库存还是花花的减少啊,都成负数了。。。

一直想不明白,后来不知道咋想的后面加了句exit;貌似就好了?请问大大这是什么原理啊。。难道history.go(-1)跳转之后后面的还会继续运行?

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