路大概就是这样,下面我提供了完整的参考代码,如果有更好的方法,也请指教
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
public $appid = 'dmm888';
public $appsecret = '
public function index(){
$this->show('
:)
欢迎使用 ThinkPHP!
[ 您现在访问的是Home模块的Index控制器 ]
}
public function test(){
if(!isset($_GET['token'])){
$this->apiReturn(4001,'invalid token');
}else if(!S($_GET['token'])){
$this->apiReturn(4001,'invalid token');
}
$data = array(
'id'=>2,
'username'=>'明之暗夜',
'info'=>array('age'=>24,'address'=>