1
私はDJSエンコードされたデータを持っていますが、これはaws dynamoDBにアップロードする必要があります。
私はこれに続きましたlink1 & link2リンク。私のデータはDBにアップロードされていません。
は私が私のJSONを共有しましょう、私はdynamo.Canに新しいです
誰も私を助けて..AWS DynamoDBにJsonエンコードデータを追加します
Json.phpは
header('Content-Type: application/json');
$feed_url = 'http://localhost/json/j_xml.xml';
$xml_data = simplexml_load_file($feed_url);
// --------------------------------------------------------------------
$i=0;
$response = array('return' => true,'message' => 'success','details' => array());
foreach($xml_data->channel->item as $ritem) {
$e_wp = $ritem->children("wp", true);
$e_author = $ritem->children("dc", true);
$e_content = $ritem->children("content", true);
// --------------------------------------
if((string)$e_wp->status =='publish') {
$post_id = (string)$ritem->guid;
$post_id = explode('=', $post_id);
$content['article_post_id'] = $post_id[1];
$content['article_title'] = (string)$ritem->title;
$content['article_cat_slug'] = 'News'.$post_id[1];
$content['article_mob_title'] = (string)$ritem->title;
$content['article_category'] = (string)$ritem->category;
$content['article_pub_date'] = (string)$e_wp->post_date;
$content['article_description'] = (string)$ritem->description;
$content['article_content'] = (string)$e_content->encoded;
$content['article_author'] = (string)$e_author->creator;
$content['article_seo_desc'] = '';
$content['article_seo_tags'] = '';
$content['article_fb_title'] = '';
$content['article_fb_desc'] = '';
$content['article_twitter'] = '';
$content['article_create_date'] = (string)$e_wp->post_date_gmt;
$content['article_status'] = (string)$e_wp->status;
}
array_push($response['details'],$content);
}
echo json_encode($response,JSON_PRETTY_PRINT);