<?php namespace org; /** * */ class Auth { public function __construct() { # code... } public function xx() { echo 'xxxxxxxxxxxxxx'; } }
3.在控制器中调用自定义的扩展类
<?phpnamespace appindexcontroller;use thinkController;use orgAuth; //引入扩展类class Index extends Controller{ public function index() { $a = new Auth(); $a->xx(); }}