0

在我的 PHP Phalcon 3 应用程序中,我有一个自定义路由:

$router->add("/{chapter}/{name}.{type:[a-z]+}", array(
        "controller" => 'images',
        "action" => 'getFile',
    ));

我使用 PHP Builtin Server 在本地测试应用程序,其他路由正常工作。如果我测试上面的路线: http://localhost:8000/XYZ/test.jpg 我总是得到一个 404。但是关于它应该工作的文档:https ://docs.phalconphp.com/en/latest/参考/路由.html

你知道有什么问题吗?

这是我的 .htrouter 用于 php 内置服务器:

<?php

if (!file_exists(__DIR__ . '/' . $_SERVER['REQUEST_URI'])) {
    $_GET['_url'] = $_SERVER['REQUEST_URI'];
}
return false;
4

0 回答 0