我想在下面的鏈接中使用這個日期選擇器(日期3腳本)。日曆日期選擇器 - PHP
http://www.triconsole.com/php/calendar_datepicker.php
它表明我這個錯誤:
Fatal error: Uncaught Error: Class 'tc_calendar' not found in C:\xampp\htdocs\test\a.php:5 Stack trace: #0 {main} thrown in C:\xampp\htdocs\test\a.php on line 5
我應該怎麼做來糾正呢?
感謝
這裏是a.php只會腳本:
<html>
<head><script language="javascript" src="calendar.js"></script></head>
<body>
<?php
$myCalendar = new tc_calendar("date5", true, false);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(2000, 2017);
$myCalendar->dateAllow('2008-05-13', '2017-03-01');
$myCalendar->setDateFormat('j F Y');
$myCalendar->setAlignment('left', 'bottom');
$myCalendar->setSpecificDate(array("2011-04-01", "2011-04-04", "2011-12-25"), 0, 'year');
$myCalendar->setSpecificDate(array("2011-04-10", "2011-04-14"), 0, 'month');
$myCalendar->setSpecificDate(array("2011-06-01"), 0, '');
$myCalendar->writeScript();
?>
<form action="somewhere.php" method="post">
<?php
//get class into the page
require_once('classes/tc_calendar.php');
//instantiate class and set properties
$myCalendar = new tc_calendar("date5", true);
$myCalendar->setDate(1, 1, 2000);
//output the calendar
$myCalendar->writeScript();
?>
</form>
</body>
</html>
你能提供'a.php'的內容? – timiTao
@timiTao我剛剛加了 –