-3
public function run() { 
$this->step = $this->$_POST("step", 1);
$this->xml = new XMLFile();
$common_data = array(
                    'STEPCONTENT' => $this->get_step_content(),
                    'STEPNUMBER' => $this->step,
                    'STEPTITLE' => $this->get_step_title()
                    ); 
echo $this->parse($this->common_template, $common_data);

这给出了例外:

Fatal error: Method name must be a string in
    C:\xampp\htdocs\test\openad\install\InstallOpenAdServer.php on line 674

为什么?

4

1 回答 1

1

这是罪魁祸首

 $this->step = $this->$_POST("step", 1);

您不能将 $_POST 超级全局数组用作函数。如果您尝试从 $_POST 访问变量,您可以简单地执行此操作

$this->step = $_POST["step"];
于 2013-02-17T06:46:06.663 回答