我无法在开发空间模拟器上测试USSD PHP应用程序 [英] I'm not able to test USSD PHP application on dev space simulator
问题描述
引用:任何人都可以帮助我在Dev Space Simulator上测试我的USSD PHP应用程序?因为我无法使用我在此链接上下载的开发空间模拟器在本地计算机上测试我的USSD应用程序:https://devspace.hsenidmobile.com/code/php/ussd/,
我的应用程序有两个文件:index.php和recall.php位于此路径中:C:\ xampp \\\ htdocs \ideamart
Quote:我的index.php代码
<?php
header('Content-type:application / json');
$ inputJson = file_get_contents('php:// input');
$ input = json_decode($ inputJson,TRUE);
?>
<?php
包括'recall.php';
?>
Quote:recall.php
<?php
$ data ['meesage'] ='Dialog Idea Mart Welcome ..';
$ data [applicationId] = $ input [applicationId];
$ data [password] =密码;
$ data [version] =1.0;
$ data [sessionId] = $ input [sessionId];
$ data [ussdOperation] =mt-cont;
$ data [destinationAddress] = $ input [sourceAddress];
$ data [encoding] =440;
$ data [chargingAmount] =5;
$ json_string = json_encode($ data);
$ ideamartURL =http:// localhost:7000 / ussd / send;
$ ch = curl_init($ ideamartURL);
$ options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array('Content-type:application / json');
CURLOPT_POSTFIELDS => $ json_string );
curl_setopt_array($ ch,$ options);
$ result = curl_exec($ ch);
?>
Quote:但是当我尝试连接时通过我的本地计算机上的Dev_space通过[http:// localhost:10001 /]我的应用程序,它给了我一个失败的消息。
我不知道是否我想念DEV_SPACE或我的应用程序或php.in文件中的一些配置
我尝试过:
我试图配置开发空间,以便它可以与我的应用程序通信但是徒劳无法
inputJson = file_get_contents('php:// input');
input = json_decode(
inputJson,TRUE);
?>
<?php
包括'recall.php';
?>
Quote:recall.php< PHP
Quote:Anyone there can helps me to test my USSD PHP application on Dev Space Simulator? Because I'm not able to test my USSD application on my local machine with Dev space Simulator that I downloaded on this link: https://devspace.hsenidmobile.com/code/php/ussd/,
My application has two files: index.php and recall.php located in this path: C:\xampp\htdocs\ideamart
Quote:My index.php code
<?php header('Content-type:application/json'); $inputJson = file_get_contents('php://input'); $input = json_decode($inputJson,TRUE); ?> <?php include 'recall.php'; ?>
Quote:recall.php
<?php $data['meesage']='Dialog Idea Mart Welcome..'; $data["applicationId"] = $input["applicationId"]; $data["password"] = "password"; $data["version"]="1.0"; $data["sessionId"]= $input["sessionId"]; $data["ussdOperation"]="mt-cont"; $data["destinationAddress"]= $input["sourceAddress"]; $data["encoding"]="440"; $data["chargingAmount"]="5"; $json_string = json_encode($data); $ideamartURL = "http://localhost:7000/ussd/send"; $ch = curl_init($ideamartURL); $options = array ( CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array('Content-type : application/json'); CURLOPT_POSTFIELDS => $json_string); curl_setopt_array($ch,$options); $result = curl_exec($ch); ?>
Quote:But when I try to connect to my application through Dev_space on my local computer through [http://localhost:10001/], it gives me a failed message.
I don't know if I miss some configuration in DEV_SPACE or in my Application or in the php.in file
What I have tried:
I tried to configure the dev space so that it can communicate with my application but in vain
inputJson = file_get_contents('php://input');
input = json_decode(
inputJson,TRUE); ?> <?php include 'recall.php'; ?>
Quote:recall.php
<?php
这篇关于我无法在开发空间模拟器上测试USSD PHP应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!