Home > Backend Development > PHP Tutorial > Call to a member function get() on null 这个如何解决呢

Call to a member function get() on null 这个如何解决呢

WBOY
Release: 2016-06-13 12:25:47
Original
6104 people have browsed it

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方法?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template