How to access data in php transferred via webwrite?
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!