本文整理匯總了PHP中Playlist::AddPlaylist方法的典型用法代碼示例。如果您正苦於以下問題:PHP Playlist::AddPlaylist方法的具體用法?PHP Playlist::AddPlaylist怎麽用?PHP Playlist::AddPlaylist使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Playlist
的用法示例。
在下文中一共展示了Playlist::AddPlaylist方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Playlist
/**
* Created by PhpStorm.
* User: idz
* Date: 4/6/15
* Time: 12:19 AM
*/
require_once 'classes/playlist.php';
// session_start();
$playlist = new Playlist();
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
if (property_exists($request, "playlistName") && property_exists($request, "athTokenPl")) {
$playlistName = $request->playlistName;
$encrypted_user_id = $request->athTokenPl;
$return_code = $playlist->AddPlaylist($playlistName, $encrypted_user_id);
if ($return_code == 1) {
echo "Playlist added successfully";
} else {
if ($return_code == 2) {
echo "Something went wrong in database";
} else {
echo "Something's wrong";
}
}
}
if (property_exists($request, "athTokenPlModel")) {
$encrypted_user_id = $request->athTokenPlModel;
$playlist_object = $playlist->GetPlaylists($encrypted_user_id);
echo json_encode($playlist_object);
}