rt1.php:ob_start();include 'pages/login-template.php';$loginForm = ob_get_clean();
pages/login-template.php:<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']);?>" method="post">
<table>
<caption>用户登录</caption>
<tr>
<td id="title">用户名</td>
<td><input type="text" name="loginUserName"
value="<?php isset($_POST['loginUserName']) ? htmlspecialchars($_POST['loginUserName']) : '';?>"/></td>
</tr>
<tr>
<td id="title">密码</td>
<td><input type="password" name="loginUserPassword" size="20"/></td>
</tr>
<tr id="btn">
<td><input type="submit" name="Login" value="提交"/></td>
<td><input type="reset" name="Reset" value="重置"/></td>
</tr>
</table>
</form>
这样ob_start这个form有效吗?
pages/login-template.php:<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']);?>" method="post">
<table>
<caption>用户登录</caption>
<tr>
<td id="title">用户名</td>
<td><input type="text" name="loginUserName"
value="<?php isset($_POST['loginUserName']) ? htmlspecialchars($_POST['loginUserName']) : '';?>"/></td>
</tr>
<tr>
<td id="title">密码</td>
<td><input type="password" name="loginUserPassword" size="20"/></td>
</tr>
<tr id="btn">
<td><input type="submit" name="Login" value="提交"/></td>
<td><input type="reset" name="Reset" value="重置"/></td>
</tr>
</table>
</form>
这样ob_start这个form有效吗?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货