dongzhaiqiang6108 2009-12-15 18:09
浏览 32
已采纳

set_include_path不包括Zend框架

I have this statement:

set_include_path('/sites/intranet/includes/Zend' . PATH_SEPARATOR . get_include_path());

but when I try to use the Acl library it seems that is not able to find the file;

require_once 'Zend/Acl/Resource/Interface.php';

The path is really included in the path, I have printed it. Any idea?

  • 写回答

2条回答 默认 最新

  • douzhang5295 2009-12-15 18:13
    关注

    If "Zend" is in your require_once instruction, you probably don't have to put it in your include_path too.

    If your directories look like this :

    /sites/intranet/includes/Zend/Acl/Resource/Interface.php
    

    Your include_path should probably be :

    set_include_path('/sites/intranet/includes' . PATH_SEPARATOR . get_include_path());
    

    (Without the "Zend" part)


    As a sidenote : why are you not using the autoloader ?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料