本文整理汇总了PHP中Picture::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP Picture::insert方法的具体用法?PHP Picture::insert怎么用?PHP Picture::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Picture
的用法示例。
在下文中一共展示了Picture::insert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
});
$app->post('/picture/getbyplace', function () {
$request = \Slim\Slim::getInstance()->request();
//$picture = json_decode($request->getBody());
$picture = json_decode($_POST["json"]);
$pictureDAO = new Picture();
//$pictureDAO->getByPlace($picture);
//echo '{"result":"ok"}';
$result = $pictureDAO->getByPlace($picture);
echo json_encode(array("pictures" => $result));
});
$app->post('/picture/send', function () {
$request = \Slim\Slim::getInstance()->request();
$param = json_decode($_POST["json"]);
$pictureDAO = new Picture();
$result = $pictureDAO->insert($param);
echo '{"result":"ok"}';
/*if(sizeof($result)>0){
echo json_encode($result);
}else{
echo json_encode(array(array("id"=>"not_found")));
}*/
});
$app->get('/favorite', function () {
$favoriteDAO = new Favorite();
$result = $favoriteDAO->get();
echo json_encode($result);
});
$app->post('/favorite', function () {
$request = \Slim\Slim::getInstance()->request();
$favorite = json_decode($request->getBody());