// 获取请求的URI $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); // var_dump(http_build_query($_POST));die; // 定义路由规则 $routes = [ '/getAccessToken', '/yzToken', '/isSuccess', '/isError', '/getData', '/getProductCategory', '/getProductPool', '/getProductDetail', '/getProductImage', '/getProductOnShelvesInfo', '/getProductInfoFromEC', '/getProvinceInfo', '/getCityInfo', '/getDistrictInfo', '/getTownInfo', '/getProductInventory', '/queryCountPrice', '/createOrder', '/addOrder', ]; // 匹配路由 if (in_array($uri, $routes)) { // include $routes[$uri]; // header("Location: );die; $res = file_get_contents('http://xtdascom.com/ecservice'.$uri.'?'.http_build_query($_POST)); echo $res;die; // header('/ecservice'.$uri);die; } $composer = dirname(__FILE__)."/vendor/autoload.php"; $iweb = dirname(__FILE__)."/lib/iweb.php"; $config = dirname(__FILE__)."/config/config.php"; require($composer); require($iweb); IWeb::createWebApp($config)->run(); ?>