gpt4 book ai didi

php - Yii 无法启动 gii

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:53:09 25 4
gpt4 key购买 nike

我正在使用 PHP Yii Framework 开发网站,我现在正在堆栈中,我需要启动 gii,但我无法执行此操作。当我输入 www.example.com/index.php/gii 或 www.example.com/gii 时,它给了我这个错误:

    /gii/default/login // <- website redirects to here

This webpage has a redirect loop
The webpage at http://www.example.com/gii/default/login has resulted in too many redirects.
Clearing your cookies for this site or allowing third-party cookies may fix the problem.
If not, it is possibly a server configuration issue and not a problem with your computer.

我不认为错误是因为修改了 htaccess 和 main 配置,但无论如何这里是 main.php 配置文件:

    'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'site/page/<view:\w+>'=>'site/page',
'<controller:\w+>/<cact:\w+>/<action:\w+>'=>'<controller>/<cact>',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),

和.htaccess:

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

#non-www to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule ^.*$ /index.php [L]

那你能帮帮我吗?

最佳答案

要使用此路径:index.php?r=gii/default/login ,您必须关闭 /protected/config/main.php 中的 url 管理器

关于php - Yii 无法启动 gii,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9707004/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com