Initial commit: 교육 프로젝트 배포
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
session_start();
|
||||
$_SESSION['ss_mb_id'] = 'U001';
|
||||
|
||||
function call_save(array $post): array {
|
||||
$_POST = $post;
|
||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||
ob_start();
|
||||
include __DIR__ . '/edu/bbs/api/save_learning.php';
|
||||
$out = ob_get_clean();
|
||||
return json_decode($out, true) ?: ['raw' => $out];
|
||||
}
|
||||
|
||||
$contentId = '20260316-069';
|
||||
|
||||
$r1 = call_save([
|
||||
'content_id' => $contentId,
|
||||
'watch_tm' => '10',
|
||||
'content_tm' => '120',
|
||||
'all_tm_increment' => '0',
|
||||
'all_tm' => '10',
|
||||
'completed' => '0',
|
||||
'is_watching' => 'Y',
|
||||
]);
|
||||
|
||||
$r2 = call_save([
|
||||
'content_id' => $contentId,
|
||||
'watch_tm' => '15',
|
||||
'content_tm' => '120',
|
||||
'all_tm_increment' => '60',
|
||||
'all_tm' => '15',
|
||||
'completed' => '0',
|
||||
'is_watching' => 'Y',
|
||||
]);
|
||||
|
||||
echo json_encode(['first' => $r1, 'second' => $r2], JSON_UNESCAPED_UNICODE), PHP_EOL;
|
||||
Reference in New Issue
Block a user