现在的位置: 首页 > 综合 > 正文

zf 问题集

2013年10月25日 ⁄ 综合 ⁄ 共 454字 ⁄ 字号 评论关闭

zf 1.8.4

 

index.php获取Zend_Controller_Front实例时,要require_once("Zend/Controller/Front.php");

requier或include库中的php文件时,其路径是相对于include_path中设定的路径的(一般是相对于../library/).

 

若要使用自定义的model,应在index.php中加

set_include_path('.' . PATH_SEPARATOR . '../library/'.

                              PATH_SEPARATOR . '../application/models/'.

                              PATH_SEPARATOR . get_include_path());

 

如果在php.ini的include_path中添加了zf的library路径则在index.php中不应再set它的library的path,避免类的重复定义。

抱歉!评论已关闭.