2015-09-14 58 views
1

我使用下面的代码得到current_url(),但找到www.xxxx.com/index.php/home/xxxx。致电current_url()时,跳过index.php。它存储www.xxxx.com/home/xxxx。 这真的是正常的行为? 如果我需要包括index.php,该怎么办?Codeigniter current_url()跳过index.php

+0

接受的答案.... :) –

回答

3

试试这个,

打开config.php文件,并做以下内容替换

$config['index_page'] = ""

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

+0

解决。谢谢 –

+0

@WingHingRaymondChiu接受答案 –

1

可以做2个提示

  1. 的config.php

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

    $config['base_url'] = 'www.example.com/index.php/';