if-statement - 如果需要考勤数据,则打开考勤文件,否则打开单据文件
问题描述
我有两个 if 条件和 else 条件。如果需要考勤数据,则打开考勤文件,否则打开单据文件。另一个如果销售数据为空则打开销售文件的条件。这两个条件都在一个文件中使用。我试过这个但没有工作。
if($needupdate =='y'){
header("location:attendance.php?msg=attendance data needed");
}else{
header("location:slip.php");
}
if(empty($result5) ){
header("location:sales.php?msg=sales data needed");
}else{
header("location:slip.php");
}
解决方案
推荐阅读
- php - PHP DOMDocument 抓取嵌套类
- javascript - ReactJS 中的滚动条
- c++ - std::multimap 的内存布局是什么?
- python - 从单击(python 模块)帮助菜单中删除“文本”
- php - 我可以使用 eloquent 连接并启动程序吗?
- python-3.7 - 如何使用 Gensim word2vec 模型预测未标记数据的情绪?
- kubernetes - Kubernetes:如何指定自动缩放初始准备?
- java - 如何找到重复的junit测试
- java - 使用特定 jvm 在具有多个 jvm 的机器上运行 java 代码的正确方法
- angular - Angular 8 拨动开关数据绑定