api接口应用类框架
程序员文章站
2022-05-13 11:56:10
...
$v) { $v = trim($v); $v = strip_tags($v); $v = addslashes($v); $data[$k] = $v; } $data['action']=explode('_',$data['action']); try{ include DOCROOT . '/model/' . $data['action'][0] . '/' . $data['action'][0] . '.php'; $api = new $data['action'][0]($data); $api->$data['action'][1](); } catch (Exception $e) { echo $e->getMessage(); } class api { public $data = array(); function __construct($data) { //根据需要,在此加载公用资源; $this->data = $data; } } ?>
上一篇: Winodws 装配 PHP开发环境
下一篇: [PHP]实用函数5_php技巧