gpt4 book ai didi

javascript - Fullcalendar 如何从 PHP 加载 BusinessHours

转载 作者:行者123 更新时间:2023-11-29 10:55:32 25 4
gpt4 key购买 nike

当我尝试从 php 加载我的 businessHours 时
我得到 enter image description here


但是当我在 businessHours 中手动粘贴 PHP 返回的 JSON 时,它工作正常。
enter image description here


json 是:

[ 
{
"daysOfWeek":"[0]",
"startTime":"09:00:00",
"endTime":"19:00:00"
},
{
"daysOfWeek":"[1]",
"startTime":"09:00:00",
"endTime":"10:00:00"
},
{
"daysOfWeek":"[2]",
"startTime":"09:00:00",
"endTime":"10:00:00"
},
{
"daysOfWeek":"[3]",
"startTime":"09:00:00",
"endTime":"14:00:00"
},
{
"daysOfWeek":"[4]",
"startTime":"09:00:00",
"endTime":"14:00:00"
},
{
"daysOfWeek":"[5]",
"startTime":"09:00:00",
"endTime":"14:00:00"
},
{
"daysOfWeek":"[6]",
"startTime":"09:00:00",
"endTime":"19:00:00"
}
]

不知道怎么回事。我的 JS 代码是:businessHours: { url: 'classes/load-orariape​​rtura.php' }
PHP代码是:https://pastebin.com/M9yL9DQn

最佳答案

解决方法:businessHours: <?php include_once('classes/load-orariapertura.php'); ?>

PHP 页面返回以 JSON 编码的数组。

关于javascript - Fullcalendar 如何从 PHP 加载 BusinessHours,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58331408/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com