- <?php
- /*
- * 调用例子
- */
- define( 'SYSPATH', './base/http/' );
- define( 'APIPATH', './com/api/' );
- require_once SYSPATH.'client.php';
- require_once SYSPATH.'response.php';
- require_once SYSPATH.'client/curl.php';
- require_once APIPATH.'connector.php';
- require_once APIPATH.'response.php';
- require_once APIPATH.'app/query.php';
- $result = Com_Api_App_Query::get( array( 'test' => 'Hello world' ) );
- if ( FALSE === $result )
- {
- echo Com_Api_Response::getError();exit;
- }
- var_dump( $result );
- echo '<br><br>';
- $result = Com_Api_App_Query::get( array( 'test' => 'Hello world' ) );
- if ( FALSE === $result )
- {
- echo Com_Api_Response::getError();exit;
- }
- var_dump( $result );
- //该片段来自于http://www.codesnippet.cn/detail/050620133809.html
来源: http://www.codesnippet.cn/detail/050620133809.html