array( 'username' => array('name' => 'username', 'default' => 'PHPer', ), ), ); } /** * 默认接口服务 * @return string title 标题 * @return string content 内容 * @return string version 版本,格式:X.X.X * @return int time 当前时间戳 */ public function index() { return array( 'title' => 'Hello World11111111!', 'content' => T('Hi {name}, welcome to use PhalApi!', array('name' => $this->username)), 'version' => PHALAPI_VERSION, 'time' => $_SERVER['REQUEST_TIME'], ); } }