Deprecated: imwpcache\f884414bce24ee67f\f73723ec7b1919fa5::__construct(): Implicitly marking parameter $YECBGYFECGEAFWHA as nullable is deprecated, the explicit nullable type must be used instead in /www/wwwroot/www.chuangxiangniao.com/wp-content/plugins/imwpcache-dist/build/f884414bce24ee67ff73723ec7b1919fa5.php on line 2

Deprecated: imwpcache\f884414bce24ee67f\f73723ec7b1919fa5::__construct(): Implicitly marking parameter $BBWFDDBHHYHDXXAB as nullable is deprecated, the explicit nullable type must be used instead in /www/wwwroot/www.chuangxiangniao.com/wp-content/plugins/imwpcache-dist/build/f884414bce24ee67ff73723ec7b1919fa5.php on line 2
yii怎样去掉index.php_创想鸟

yii怎样去掉index.php

yii去掉index.php的方法:1、开启apache的mod_rewrite模块,并重启apache;2、编辑项目中的/config/web.php文件;3、在与index.php文件同级目录下添加【.htaccess】文件。

yii怎样去掉index.php

具体方法:

(推荐教程:php图文教程)

1、开启apache的mod_rewrite模块

去掉LoadModule rewrite_module modules/mod_rewrite.so前的“#”符号

立即学习“PHP免费学习笔记(深入)”;

确保DocumentRoot “/Library/WebServer/Documents”中有“AllowOverride All”

重启apache,命令: sudo apachectl restart

2、在项目中的/config/web.php中添加代码:

components'=>array(              ...'urlManager' => [            'enablePrettyUrl' => true,            'showScriptName' => false,            'rules' => [                '/'=>'/',            ],        ],            )

(视频教程推荐:php视频教程)

3、在与index.php文件同级目录下(/web/)添加文件“.htaccess”,内容如下:

Options +FollowSymLinksIndexIgnore */*RewriteEngine on# if a directory or a file exists, use it directlyRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-d# otherwise forward it to index.phpRewriteRule . index.php

以上就是yii怎样去掉index.php的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/85202.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
微信怎么更好管理客户
上一篇 2025年11月17日 04:06:20
客户档案管理怎么分类
下一篇 2025年11月17日 04:06:39

相关推荐

发表回复

登录后才能评论
关注微信