前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >CI框架中base_url关于[::1]的问题

CI框架中base_url关于[::1]的问题

作者头像
致Great
发布2023-08-26 19:09:41
1530
发布2023-08-26 19:09:41
举报
文章被收录于专栏:程序生活程序生活
  1. [::1]是ip6的localhost等价地址

  1. 在当今最新的CI框架中,不推荐使config/config.php下的: base_url为空,推荐是下列格式: config[‘base_url’] = ‘http://localhost/yourproject/‘;config[‘base_url’] = ‘http://www.example.com/‘; 并且以 /结尾
代码语言:javascript
复制
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
|   http://example.com/
|
| WARNING: You MUST set this value!
|
| If it is not set, then CodeIgniter will try guess the protocol and path
| your installation, but due to security concerns the hostname will be set
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
| The auto-detection mechanism exists only for convenience during
| development and MUST NOT be used in production!
|
| If you need to allow multiple domains, remember that this file is still
| a PHP script and you can easily do that on your own.
|
*/
$config['base_url'] = 'http://localhost/quincy/';

否则会出现加载不出来css、js等资源

本文参与?腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2017-01-17,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客?前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与?腾讯云自媒体分享计划? ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
http://www.vxiaotou.com