
thinkphp框架问题 表单提交问题
<formmethod='post'action="thinkphp/index.php/User/modfiy"><inputtype="hidden"name='id...
<form method='post' action="thinkphp/index.php/User/modfiy"><input type="hidden" name='id' value='{$data.id}'/> 姓名:<input type="text" name="username" value="{$data.username}"/><br />性别:男<input type="radio" name="sex" value="1">女<input type="radio" name="sex" value="0"/><br/><input type="submit" value="修改">我没单击一次提交 地址栏就在当前路径上加上thinkphp/index.php/User/modfiy这样http://localhost/thinkphp/index.php/User/update/id/thinkphp/index.php/User/thinkphp/index.php/User/thinkphp/index.php/User/modfiy这是怎么回事?不直接跳到action的地址 却是路径叠加啊
展开
3个回答
展开全部
form的提交地址重新确认一下,你后台的操作是否在某个分组下
看了你的代码应该是在一个分组下,那么就可以按照下面的写法:
<form method='post' action="__URL__/modfiy">
看了你的代码应该是在一个分组下,那么就可以按照下面的写法:
<form method='post' action="__URL__/modfiy">
追问
这个方法可行 谢谢
展开全部
url地址最好使用U方法生成
action="{:U('user/modfiy')}"
action="{:U('user/modfiy')}"
追问
这个方法可行 谢谢
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
action要填绝对地址的
更多追问追答
追问
我这个是绝对地址啊
追答
这是相对地址~绝对地址就是前面http开头的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询