Zend Date is giving me fatal error msg

家住魔仙堡 提交于 2019-12-07 05:06:25

You need Zend/Date.php, not Zend/Date/DateObject.php. Furthermore, you might need some autoloader to load other classes that Zend_Date depends on, but probably not, as they are usually automatically included in the Zend class files already.

Let me correct my last statement. As a minumum you need to include the path to the Zend library in your include paths. For instance, like so:

// first entry are the already defined include paths,
// second entry is path to Zend library
set_include_path(
 get_include_path() . PATH_SEPARATOR .
 'path/to/library'
);

So, take for example the path C:\library\Zend as you Zend library, you would then have to add C:\library to your include path. This way all require|include(_once) statements in Zend components look in the right include paths.

Furthermore you can then also simply include the right component like so:

require_once 'Zend/Date.php';

$date = new Zend_Date();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!