php5.2中cal_days_in_month的问题

Python/PHP/Perl 开发与设计
回复
liugehao
帖子: 61
注册时间: 2006-12-21 11:47
送出感谢: 0
接收感谢: 0

php5.2中cal_days_in_month的问题

#1

帖子 liugehao » 2007-01-10 20:47

编译安装的php5.2
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-xml --with-mysql=/usr/local/mysql' --with-pgsql=/usr/local/pgsql

用cal_days_in_month(0,$date['mon'],$date['year']);
提示:Call to undefined function cal_days_in_month()

用 PHP手册上例子也是同样错误
<?php
$num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31
echo "There was $num days in August 2003";
?>
请问,是什么原因?
liugehao
帖子: 61
注册时间: 2006-12-21 11:47
送出感谢: 0
接收感谢: 0

#2

帖子 liugehao » 2007-01-10 21:02

cal_from_jd()也用不了,是不是编译时要加什么选项?
liugehao
帖子: 61
注册时间: 2006-12-21 11:47
送出感谢: 0
接收感谢: 0

#3

帖子 liugehao » 2007-01-10 21:04

结贴


To get these functions to work, you have to compile PHP with --enable-calendar.
回复

回到 “Python/Php/Perl”