Calling other function in the same controller?

前端 未结 2 1890
一整个雨季
一整个雨季 2020-12-24 10:12

I\'ve this controller, and the function read($q) return error Call to undefined function sendRequest()



        
2条回答
  •  有刺的猬
    2020-12-24 10:45

    Yes. Problem is in wrong notation. Use:

    $this->sendRequest($uri)
    

    Instead. Or

    self::staticMethod()
    

    for static methods. Also read this for getting idea of OOP - http://www.php.net/manual/en/language.oop5.basic.php

提交回复
热议问题