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

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

corrections and example of {html_style}, {html_options}, API info

File size: 621 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}
28
29
30?>
Note: See TracBrowser for help on using the repository browser.