用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1497|回复: 1
收起左侧

[已解决] site_url=[::1],什么问题导致的?

[复制链接]
发表于 2018-4-13 14:30:28 | 显示全部楼层 |阅读模式
第一次使用ci
参考文档进展到这一步
http://codeigniter.org.cn/user_guide/tutorial/news_section.html

运行之后发现
<p><a href="<?php echo site_url('news/'.$news_item['slug']); ?>">View article</a></p>
<a href="http://[::1]/index.php/news/hello slug!">View article</a>

site_url=[::1]是什么原因导致的。

看到之前有篇帖子也在问这个问题,没有人解决吗?
http://codeigniter.org.cn/forums/thread-22666-1-1.html
发表于 2018-4-14 22:31:05 | 显示全部楼层
必须设置 config/config.php 里的 site_url 配置项,配置项内容为 http://你的域名.com/

本版积分规则