Frequently Asked Questions
Two calendars?
-
Two calendars?
Posted on May 21, 2004
Written by
Louise (view more by Louise)
Filed under FAQ, PHPCalendar, Scripts
Can I include two of the calendar files (such as calendar.php and calendar_year.php) on the same page?
Sorry, but no. You will get an error like this:
Fatal error: Cannot redeclare class date_calc in /home/user/public_html/calendar/calc.php on line 31
This happens because calendar.php defines the date_calc function relating it to the month, since it’s just a month calendar. The other two files (calendar_year.php and calendar_bdays.php) define the date_calc function relating it to the year. So, when you try to include them to the same page, the second file you include won’t work.