フィルターのクリア

How to access data in php transferred via webwrite?

1 回表示 (過去 30 日間)
Benvaulter
Benvaulter 2016 年 4 月 4 日
Hey everyone,
I am using webwrite to parse some data to a php script like so:
data = struct('userId', 'testuser','Password', 1234);
url = 'http://example.info/php/test.php';
options = weboptions('MediaType', 'application/json');
response = webwrite(url, data, options);
I want to access the data originally stored in the struct in my php script, but don't know how I can refer to the parsed data in the php script (is it similar to using "GET" and "POST" when using URL-encoded data?)
To start with, I'd simply like to display the transferred data with php like so:
$data = json_decode($data,true);
echo '<pre>' . print_r($json, true) . '</pre>';
As mentioned above, my problem is how I can get the now json-encoded struct element sent by Matlab into the php variable "$data".
Thanks in advance!

回答 (0 件)

カテゴリ

Help Center および File ExchangeWeb Services についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by