【发布时间】:2016-09-23 08:55:57
【问题描述】:
我有一个使用 Zend Framework 2 构建的 php 项目。想要启动内置服务器以使用以下命令进行开发:
sudo php -S localhost:8080 -t public/ public/index.php
Zend Frameowrk 2 的所有功能都运行良好,但检索资产时出现 404 错误。
资产位于public/css、public/img 和public/js 文件夹中。
GET
http://localhost:8080/css/bootstrap.css [HTTP/1.1 404 Not Found 10ms]
GET
http://localhost:8080/css/dlu-tw-bootstrap.css [HTTP/1.1 404 Not Found 21ms]
GET
http://localhost:8080/css/style.css [HTTP/1.1 404 Not Found 35ms]
GET
http://localhost:8080/js/bootstrap.js [HTTP/1.1 404 Not Found 45ms]
知道如何允许内置服务器访问这些文件吗?
【问题讨论】:
标签: php zend-framework2 assets php-builtin-server