qlg.tsgz.moe/wxtmp/pptWX.php
2019-09-06 23:53:10 +08:00

28 lines
603 B
PHP
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
require 'pptWXBase.php';
class pptWX extends pptWXBase
{
public function index(){
$abc='11111';
return $abc;
}
public function getList(){
$abc=[1,2,3,4,5];
return $abc;
}
}
//获取数据,通过路由信息,如***.com/passport/wx.php/pptWX/getList,即调用pptWX类getList方法
function getData(){
$uri = explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
foreach ($uri as $k=>$v) {
if('pptWX' == $v){
$class = $uri[$k];
$object = new $class();
$action = $uri[($k+1)];
return $object->$action();
}
}
}