コード例 #1
0
ファイル: index.php プロジェクト: wakeel39/mytestwork
        } else {
            $postSuccessParms[$ext[0]] = $ext[3];
        }
        if (strtolower($ext[2]) == 'r') {
            $postErrorParms[$ext[0]] = $ext[3];
        }
        /*
         *set paramerts for show tables 
         */
        $menus[$i]['param'][] = $ext;
    }
    $u = $serverurl . trim($url);
    /*
     * geting response for success
     */
    $reponseSuccess = $DocClass->PostData($u, $method, $postSuccessParms);
    $res = json_decode($reponseSuccess);
    $json_string = json_encode($res, JSON_PRETTY_PRINT);
    $menus[$i]['reponseSuccess'] = $json_string;
    /*
     * geting response for error
     */
    array_pop($postErrorParms);
    $reponseError = $DocClass->PostData($u, $method, $postErrorParms);
    $res = json_decode($reponseError);
    $json_string = json_encode($res, JSON_PRETTY_PRINT);
    $menus[$i]['reponseError'] = $json_string;
    $i++;
}
$string = '<!doctype html>  
<!--[if IE 6 ]><html lang="en-us" class="ie6"> <![endif]-->
コード例 #2
0
ファイル: getdata.php プロジェクト: wakeel39/mytestwork
<?php

error_reporting(0);
header('Access-Control-Allow-Origin: *');
include "docclass.php";
$DocClass = new DocClass();
$method = $_POST['method'];
$url = $_POST['url'];
unset($_POST['url']);
unset($_POST['method']);
$reponseSuccess = $DocClass->PostData($url, $method, $_POST);
$res = json_decode($reponseSuccess);
echo json_encode($res, JSON_PRETTY_PRINT);