php提交表单不是重定向给定的操作,而是重定向到主页。我用Yii 2,漂亮的URL..但是我不想使用yii2提交表单。请帮我解决这个问题。我不确定我们是否可以在Yii 2框架中使用core php表单
<head>
<title>Form</title>
</head>
<body>
<form action = "/syllabus/lms/index" method = "post">
Author : <input type = "text" name = "author"
placeholder = "Author's Name" />
<br><br>
Number of published Article : <input type = "number"
name = "num_article" placeholder = "Published Article" />
<br><br>
<input type = "submit" name = "submit" value = "Submit">
</form>
</body>
</html>
<?php
if (isset($_POST['submit'])) {
echo "test";
}```
尝试更改给定的动作参数。修改这行代码:
<form action = "/syllabus/lms/index" method = "post">
:
<form action = "syllabus/lms/index.php" method = "post">