dongyuanguang3893 2010-03-10 03:34
浏览 96

如何在我的域中包含Zend Framework库?

Locally, on my xampp installation, the Zend folder is under PEAR\Zend, and Pear is in the include path. So when I do require_once "Zend\Date.php" there is no problem.

However, on my domain (Hostmonster), that's not the case. I have no idea where the Zend folder is, although doing phpinfo(); seems to indicate that Zend Framework is definitely available. I asked the host, and they told me to include zend_extension="/usr/local/Zend/lib/Optimizer-3.3.9/php-5.2.x/ZendOptimizer.so" at the bottom of the php.ini file, which didn't help at all.

Also, I don't know what that statement in the php.ini file even does. Could anyone please help?

  • 写回答

3条回答 默认 最新

  • dqaxw44567 2010-03-10 20:48
    关注

    Perhaps you could upload the Zend library to your shared hosting account in a directory like /home/your_account/public_html/zend.

    Then modify (or create if it doesn't exist) a php.ini file in your webroot directory /home/your_account/public_html. Add the following:

    include_path = .:/home/your_account/public_html/Zend
    

    Note: this will override any default include paths set by PHP. The . represents the current directory and : separates the different paths.

    Now in your PHP file you can add at the top:

    require_once 'Zend/Date.php';
    
    评论

报告相同问题?

悬赏问题

  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答