再会 !
如果我说错了什么,我会提前道歉。
我使用 VKontakte API,那里有一个方法wall.post,它有一个参数publish_date(帖子的发布日期,粗略地说,是发送帖子的计时器)。
我正在请求提交帖子并正在使用此选项。
而不是unixtime按照 VK 的要求使用 ,而是strtotime在构建 PHP 请求时使用该函数。
如何正确组合strtotime以使变量$view_timePublish['timePublish']起作用?
我尝试更改引号,但 VK API 忽略了publish_date.
该变量从数据库中分配了一个值。
这是代码:
$date_posting = strtotime('+'.$view_timePublish['timePublish'].' min');
$request_params_group = array(
'owner_id' => $group_ids,
'from_group' => 1,
'message' => $post_message,
'attachments' => $ready_photo,
'publish_date' => $date_posting,
'access_token' => $access_token_standalone,
'v' => $api_version
);
$get_params_group = http_build_query($request_params_group);
$result_group = json_decode(file_get_contents('https://api.vk.com/method/wall.post?'. $get_params_group));
发现了什么问题。错误是有必要通过 strtotime() 再次运行从数据库中获取的时间;