I'm a newbie around here and I've run into a dead end.
(我是这里的新手,已经走到了死胡同。)
So I've created a function to draw a calendar in php.
(因此,我创建了一个在php中绘制日历的函数。)
And I've been using css to set the colors of days and that stuff.(而且我一直在使用CSS来设置日期和其他内容的颜色。)
The function runs well and uses 2 input variables like this:(该函数运行良好,并使用了两个输入变量,如下所示:)
PHP file (calendar.php):
(PHP文件(calendar.php):)
<?php
function draw_calendar($month,$year)
{
// the code
}
echo draw_calendar($current_month,$current_year);
?>
What I've been trying to do is use jquery/ajax (from my index file) to post/get variables to calendar.php for $current_month and $current_year to use.
(我一直想做的是使用jquery / ajax(从我的索引文件中)将$ current_month和$ current_year的变量发布/获取到calendar.php中。)
And then echo the function to my index somehow.(然后以某种方式将函数回显到我的索引。)
For the life of my I can't manage to do that.(在我的一生中,我无法做到这一点。)
I could only find how to return simple strings and alert them to my index.(我只能找到如何返回简单字符串并将它们提醒到我的索引。)
ask by C B translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…