Introduce class thinkphp5.0

2527 단어

/application/index/controller/test.PHP



namespace app\index\controller;   
use think\Controller;
use app\common\jssdk\getjsapiticket;     
              \ \ 
class Test extends Controller
{
    public function test()
       {
          $pinyin = new getjsapiticket();    // 
          var_dump($pinyin->nihao());
       }
}

/application/common/fast calculation/a Tianjin API ticket.PHP



namespace app\common\jssdk;// func
use Think\Controller;

Class getjsapiticket extends Controller{ // getjsapiticket 
 public function nihao(){// nihao
  echo 123;
 }

}
?>

좋은 웹페이지 즐겨찾기