【发布时间】:2017-12-22 09:58:51
【问题描述】:
php版本下
PHP 5.2.4 (cli) (built: Oct 16 2007 16:54:49)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
isset 函数工作正常,下面是脚本中的 sn-p。
<form name="fff" method=post style="font-size:12pt;">
<tr height="24">
<td height="24" width="105"> <p align="left" style="margin-left:10;"><b><font face="Arial"><span style="font-size:10pt;"><?php echo $Agent_03; ?></span></font></b></p> </td>
<td height="24" width="40">
<p align="center">
<input type="text" name="CosHour_03" value="<?php echo $AtdH_03; ?>" style="font-weight:normal; font-size:10pt; color:rgb(102,102,102); text-align:center; on" maxlength="2" size="2">
</p>
</td>
<td height="24" width="5"> <p align="center"><b><font face="Arial"><span style="font-size:10pt;">:</span></font></b></p> </td>
<td height="24" width="40">
<p align="center">
<input type="text" name="CosMine_03" value="<?php echo $AtdM_03; ?>" style="font-weight:normal; font-size:10pt; color:rgb(102,102,102); text-align:center; on" maxlength="2" size="2">
</p>
</td>
<td height="24" width="105">
<p align="right">
<input type="text" name="Cs_03" value="" style="font-weight:normal; font-size:10pt; color:rgb(102,102,102); on" maxlength="12" size="12">
</p>
</td>
<td height="24" width="185">
<p align="left"><input type="text" name="CnsCoe_03" value="<?php echo $CleCoe_03; ?>" style="font-weight:normal; font-size:10pt; color:rgb(102,102,102); on" maxlength="24" size="24">
</p>
</td>
</tr>
<p align="center" ;">
<input type="submit" name="ReportCons_Submit" value="SUBMIT" style="font-family:Arial; font-weight:bold; font-size:14; color:rgb(32,46,125); letter-spacing:4; text-align:center; background-color:rgb(204,204,204); margin-left:0;" size="200">
</p>
</form>
<?php
if ( isset( $ReportCons_Submit)) {
$alertmessage = "";
$successmessage = "";
$strCountry = strtoupper( $Country);
$strLocation = strtoupper( $Location);
$strFixedDate = date("Ymd", strtotime(date("Y")."-".$CnsMonth."-".$CnsDay));
.
.
.
.
?>
同样的事情在最近的 php 版本中不起作用。
PHP 5.4.16 (cli) (built: Apr 4 2016 07:13:18)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
如果我们点击提交按钮,我感觉控件不会进入 if 语句。
我们将不胜感激。
【问题讨论】:
-
您能说明变量 $ReportCons_Submit 的定义位置吗?