Symfony Profiler无法更改面板

时间:2018-09-12 10:04:23

标签: symfony profiler

我刚刚开始学习Symfony,但是我在symfony的探查器中遇到了一个奇怪的问题,我可以访问该页面,但无法在面板之间导航,每次单击左侧菜单中的面板时,页面都会重新加载并显示“请求/响应”面板。

我与laragon在本地合作,这是我的composer.json:

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "sensio/framework-extra-bundle": "^5.2",
        "sensiolabs/security-checker": "^4.1",
        "symfony/asset": "*",
        "symfony/console": "*",
        "symfony/flex": "^1.1",
        "symfony/framework-bundle": "*",
        "symfony/twig-bundle": "*",
        "symfony/yaml": "*"
    },
    "require-dev": {
        "easycorp/easy-log-handler": "^1.0.7",
        "symfony/debug-bundle": "^3.3|^4.0",
        "symfony/dotenv": "*",
        "symfony/monolog-bundle": "^3.0",
        "symfony/profiler-pack": "^1.0",
        "symfony/var-dumper": "^3.3|^4.0"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd",
            "security-checker security:check": "script"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.1.*"
        }
    } }

在日志中似乎没有问题:

[2018-09-12 10:51:46] request.INFO: Matched route "_profiler". {"route":"_profiler","route_parameters":{"_route":"_profiler","_controller":"web_profiler.controller.profiler::panelAction","token":"8a6acb"},"request_uri":"http://aelth.test/_profiler/8a6acb?%2F_profiler%2F8a6acb=","method":"GET"} []
[2018-09-12 10:51:46] request.INFO: Matched route "_profiler_search_bar". {"route":"_profiler_search_bar","route_parameters":{"_route":"_profiler_search_bar","_controller":"web_profiler.controller.profiler::searchBarAction"},"request_uri":"http://aelth.test/_profiler/search_bar?%2F_profiler%2F8a6acb=","method":"GET"} []

1 个答案:

答案 0 :(得分:0)

问题解决了,这是我的错。

RewriteRule ^(.*)$ index.php?/$1 [L]

代替:

RewriteRule ^(.*)$ index.php/$1 [L]

在.htaccess中