zoukankan      html  css  js  c++  java
  • CI 框架访问 http://[::1]/yourproject/

    Chances are you have left the base url blank
    /* |-------------------------------------------------------------------------- | 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'] = '';


    Go to application/config/config.php set base_url

    $config['base_url'] = 'http://localhost/example/';

    Then ::1 error should be gone.

    Now days in latest versions of codeIgniter it is not recommend that you leave your base_url blank.

    • $config['base_url'] = 'http://localhost/yourproject/';
    • $config['base_url'] = 'http://www.example.com/';

    And is always good to end url with /

    二:此原因及升级版本后,CodeIgniter-3.0.6systemcoreConfig.php 构造函数体内  $_SERVER['SERVER_ADDR']  造成,改成 $_SERVER['HTTP_HOST'],做相应调整亦可。

  • 相关阅读:
    java坏境内存不够用 大量占用swap 临时加swap
    磁盘分区
    简述raid0,raid1,raid5,raid10 的工作原理及特点
    给用户提权
    用户的环境变量被删除了
    定时任务
    linux权限
    kafka部署
    数据仓库
    kylin
  • 原文地址:https://www.cnblogs.com/c-961900940/p/5972753.html
Copyright © 2011-2022 走看看