<div class="msg_div">
<h1>信息发布</h1>
<form class="msg_form" id="send_form" method="post" action={:U('Index/msg_handle')}>
<label for="username">用户名:</label>
<input type="text" name="username" id="send_username" class="txtfield" tabindex="1" /></br>
<label for="content">发布内容:</label>
<!--<input type="text" name="content" id="send_content" class="txtfield" tabindex="2" />-->
<textarea type="submit" name="content" id="send_content" class="txtfield" tabindex="2" cols="5" rows="10"></textarea>
<input type="submit" class="flatbtn-blu"/><button type="button" class="flatbtn-blu" id="close_msg_div">关闭</button>
</form>
</div>
使用了U方法进行表单提交,将内容提交到Index控制器下的msg_handle方法,没有问题。之后我在Tpl目录下建立了注册login.php登陆页面和sign.php注册页面。在login.php和sign.php里用U方法提交表单就提示错误:You don't have permission to access /shequwang1.2/App/Tpl/Index/{:U(Index/login')} on this server.请问怎么解决?
<div class="login_div" >
<form id="login_form" method="post" action={:U('Index/login')}>
<p><title>请输入正确信息登录</title></p>
<label for="username">用户名:</label>
<input type="text" name="username" class="txtfield" id="login_username" value="用户名" />
<label for="password">密码:</label>
<input type="password" name="userpwd" class="txtfield" id="login_userpwd" value="密码" />
<input type="submit" value="登录" class="flatbtn-blu" id="sub_btn"/><input type="button" value="关闭" class="flatbtn-blu" id="close_btn"/>
</form>
最佳答案
