Rumah >pembangunan bahagian belakang >tutorial php >Call to a member function get() on null 这个如何解决呢
Call to a member function get() on null 这个怎么解决呢
class CountController extends Controller{
//核心算法
//用户输入的数据收集
var $planstart;//计划开始时间
var $planend;//计划结束时间
var $plantime;//计划周期
var $goodnum;
var $workernum;
var $workday;//工作制
var $workereff;
var $dutyarr;
//进行赋值
function __construct(){
$this->planstart=$_POST['pl_start'];
$this->planend=$_POST['pl_end'];
$this->plantime=$this->planend-$this->planstart;
$this->goodnum=$_POST['pl_goodnum'];
$this->workernum[0]=$_POST['pl_opmember'];$this->workernum[1]=$_POST['pl_psmember'];$this->workernum[2]=$_POST['pl_exmember'];
$this->workday=$_POST['pl_workday'];
$this->workereff=8;//每天8个工时
$this->dutyarr=$_POST['duty_arr'];
}
为什么会有这个提示呢,构造函数里那个地方写错了呢
------解决思路----------------------
你哪边调用了不存在的get方法?