【发布时间】:2011-04-02 15:36:15
【问题描述】:
我在 windows vista 上使用 zend 社区服务器。我正在学习 Keith Pope 的 Zend Framework 1.8 一书中的教程。
$this->_view->headLink()->appendStylesheet('/css/main.css');
没有找到 main.css 文件 (404)。实际的文件路径是 htdocs/myapp/public/css/main.css 。当我取出斜线并将其更改为
$this->_view->headLink()->appendStylesheet('css/main.css');
它工作正常。但是,当在 zend 文档中查找 appendStylesheet 函数的示例时,它使用了示例
$this->headLink()->appendStylesheet('/styles/basic.css')
所以在我看来,现在对我“有效”的东西是不正确的。关于为什么会这样的任何想法?
【问题讨论】:
标签: php windows apache zend-framework path