source: extensions/skeleton/trunk/include/ws_functions.inc.php @ 24182

Last change on this file since 24182 was 24182, checked in by mistic100, 11 years ago

remove php end tags, remove at symbol in template, add example of class handlers, remove useless files

File size: 617 bytes
Line 
1<?php
2defined('SKELETON_PATH') or die('Hacking attempt!');
3
4function skeleton_ws_add_methods($arr)
5{
6  $service = &$arr[0];
7 
8  $service->addMethod(
9    'pwg.PHPinfo',
10    'ws_php_info',
11    array(
12      'what' => array('default'=>'INFO_ALL', 'info'=>'This parameter has a default value'),
13      'ids' => array('flags'=>WS_PARAM_FORCE_ARRAY, 'info'=>'This one must be an array'),
14      ),
15    'Returns phpinfo (don\'t use XML request format)'
16    );
17}
18
19function ws_php_info($params, &$service)
20{
21  if (!is_admin())
22  {
23    return new PwgError(403, 'Forbidden');
24  }
25 
26  return phpinfo(constant($params['what']));
27}
Note: See TracBrowser for help on using the repository browser.