当前位置: 动力学知识库 > 问答 > 编程问答 >

Codeigniter current_url() skip index.php

问题描述:

I am using below code to get current_url() but find that www.xxxx.com/index.php/home/xxxx. index.php is skipped in calling current_url(). It store www.xxxx.com/home/xxxx.

Is it really normal behavior?

If i need to include index.php, how to do??

网友答案:

Try this,

Open config.php and do following replaces

$config['index_page'] = ""

to

$config['index_page'] = "index.php"

网友答案:

can do 2 tips

  1. in config.php

    $config['index_page'] = "index.php"
    
  2. In config.php

    $config['base_url'] = 'www.example.com/index.php/';
    
分享给朋友:
您可能感兴趣的文章:
随机阅读: