【发布时间】:2021-11-19 09:34:14
【问题描述】:
这段代码在first.php中
function fas(){
echo "fuction";
echo "Anything";
}
if(isset($_POST['btn'])){
fas();
}
?>
second.php 中的代码
<?php
include 'first.php'
?>
<!DOCTYPE html>
<head>
<title>Document</title>
</head>
<body>
<button type= "submit" name = "btn"> click this</button>
</body>
</html>
单击按钮时,不会调用函数 fas。有什么问题?
【问题讨论】:
-
您有一个提交按钮,但没有任何 to 实际提交...这需要在按钮周围有一个
form。