api.php
资源名称:ext-3.1.0.zip [点击查看]
上传用户:dawnssy
上传日期:2022-08-06
资源大小:9345k
文件大小:1k
源码类别:
JavaScript
开发平台:
JavaScript
- <?php
- require('config.php');
- header('Content-Type: text/javascript');
- // convert API config to Ext.Direct spec
- $actions = array();
- foreach($API as $aname=>&$a){
- $methods = array();
- foreach($a['methods'] as $mname=>&$m){
- $md = array(
- 'name'=>$mname,
- 'len'=>$m['len']
- );
- if(isset($m['formHandler']) && $m['formHandler']){
- $md['formHandler'] = true;
- }
- $methods[] = $md;
- }
- $actions[$aname] = $methods;
- }
- $cfg = array(
- 'url'=>'php/router.php',
- 'type'=>'remoting',
- 'actions'=>$actions
- );
- echo 'Ext.app.REMOTING_API = ';
- echo json_encode($cfg);
- echo ';';