php与mysql web开发book小实例中有个页面,里面的自定义函数有些最后加了分号,有些没有,为什么要加分号,加和不加有什么区别,下面是其中一段代码,第一个没有加分号,第二个加了。
<?php
function display_add_bm_form()
{
// display the form for people to ener a new book in
?>
<form name='bm_table' action='add_bms.php' method='post'>
<table width=250 cellpadding=2 cellspacing=0 bgcolor='#cccccc'>
<tr><td>New BM:</td><td><input type='text' name='new_url' value="http://"
size=30 maxlength=255></td></tr>
<tr><td colspan=2 align='center'><input type='submit' value='Add book'></td></tr>
</table>
</form>
<?php
}function display_password_form()
{
// display html change password form
?>
<br />
<form action='change_passwd.php' method='post'>
<table width=250 cellpadding=2 cellspacing=0 bgcolor='#cccccc'>
<tr><td>Old password:</td>
<td><input type='password' name='old_passwd' size=16 maxlength=16></td>
</tr>
<tr><td>New password:</td>
<td><input type='password' name='new_passwd' size=16 maxlength=16></td>
</tr>
<tr><td>Repeat new password:</td>
<td><input type='password' name='new_passwd2' size=16 maxlength=16></td>
</tr>
<tr><td colspan=2 align='center'><input type='submit' value='Change password'>
</td></tr>
</table>
<br />
<?php
};
?>
<?php
function display_add_bm_form()
{
// display the form for people to ener a new book in
?>
<form name='bm_table' action='add_bms.php' method='post'>
<table width=250 cellpadding=2 cellspacing=0 bgcolor='#cccccc'>
<tr><td>New BM:</td><td><input type='text' name='new_url' value="http://"
size=30 maxlength=255></td></tr>
<tr><td colspan=2 align='center'><input type='submit' value='Add book'></td></tr>
</table>
</form>
<?php
}function display_password_form()
{
// display html change password form
?>
<br />
<form action='change_passwd.php' method='post'>
<table width=250 cellpadding=2 cellspacing=0 bgcolor='#cccccc'>
<tr><td>Old password:</td>
<td><input type='password' name='old_passwd' size=16 maxlength=16></td>
</tr>
<tr><td>New password:</td>
<td><input type='password' name='new_passwd' size=16 maxlength=16></td>
</tr>
<tr><td>Repeat new password:</td>
<td><input type='password' name='new_passwd2' size=16 maxlength=16></td>
</tr>
<tr><td colspan=2 align='center'><input type='submit' value='Change password'>
</td></tr>
</table>
<br />
<?php
};
?>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货