redhat2
پنج شنبه 17 اسفند 1391, 12:55 عصر
سلام به دوستان ، من یه همچین فرمی دارم ، فرض کنید url من ای هست :
localhost/index/index که اولی Controller ودومی action هست ،
این فرم من هست :
index.tpl :
<html>
<head>
<title></title>
</head>
<body>
<form action="index/index/" method="GET">
<h2><?php echo $title; ?></h2>
<input type="text" name="username" />
<input type="submit" value="login" />
</form>
</body>
</html>
خوب وقتی من توی صفحه کلیک میکنم url این شکلی میشه :
http://localhost/index/index/index/index/?username=saeed
نمیخوام اینطوری بشه ، میخوام اینطوری بشه :
http://localhost/index/index/?username=saeed
باید چیکار کنم؟ ، درضمن میخوام بدونم من اگه یک Action داشته باشم به نام Register میخوام که به action دیگه ای به نام login منتقل بشه ، آیا تابعی هست هر دوی این Action ها ماله indexcontroller هست .
localhost/index/index که اولی Controller ودومی action هست ،
این فرم من هست :
index.tpl :
<html>
<head>
<title></title>
</head>
<body>
<form action="index/index/" method="GET">
<h2><?php echo $title; ?></h2>
<input type="text" name="username" />
<input type="submit" value="login" />
</form>
</body>
</html>
خوب وقتی من توی صفحه کلیک میکنم url این شکلی میشه :
http://localhost/index/index/index/index/?username=saeed
نمیخوام اینطوری بشه ، میخوام اینطوری بشه :
http://localhost/index/index/?username=saeed
باید چیکار کنم؟ ، درضمن میخوام بدونم من اگه یک Action داشته باشم به نام Register میخوام که به action دیگه ای به نام login منتقل بشه ، آیا تابعی هست هر دوی این Action ها ماله indexcontroller هست .