Some of the guys said it was ispost wrong, and now we're going to send a look at what's on the manual.
Red Label 3 is a simple few lines of code, the red one is the method of the corresponding link
The problem is, my code is clearly written in the case of if (is_post), only echo that 11111, why the display page is displayed directly, Ah, should not be after I click the Submit button to appear?
Submit Address Yes
PHP section:
Class Bcastaction extends commonaction{
public function index(){
$this->display();}
Public Function Insert () {
$this->display();
}
public function add(){
$IS _post=$_server[' request_method '] = = ' POST '? True:false;
if($IS_POST){
Echo ' 111 ';d ie;
}
}
}
?>
That's all, I don't know what's wrong.
Should be
if (is_post)
{
echo 111;
}
Your tp
version of 2.0 is not supported, IS_POST
IS_GET
This type of notation, tp
the constant IS_POST
, IS_GET
and so on in the 3.1 version only. Since the wording does not support, you directly use the most primitive $_post, $_get can not? Finish the task first.