【问题标题】:codeigniter query string and segment togethercodeigniter 查询字符串和段在一起
【发布时间】:2011-10-11 10:54:47
【问题描述】:

在我的项目中,我需要查询字符串功能和分段数组功能。因为某些返回 url 是查询字符串形式。 我进行了以下更改,但没有成功。

我的config.php 看起来像

$config['base_url'] = '';
$config['uri_protocol'] = 'PATH_INFO';
$config['enable_query_strings'] = TRUE;

而我的.htaccess 文件是

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^$ /test/index.php [L] 
RewriteCond $1  !^(index\.php|resource|smsprinter|media|Scripts|system|public|upload|flash|css|js|pop-up|images|user_guide|scripts|robots\.txt|favicon\.ico) 
RewriteRule ^(.*)$ /test/index.php/$1 [L]

有没有办法只在任何特定页面中设置查询字符串格式?或者有什么办法可以解决这个问题?

【问题讨论】:

标签: php .htaccess codeigniter


【解决方案1】:

我已经找到了解决方案。 htaccess 文件中没有 chage 但是配置文件有一些变化。 配置文件应该是 $config['base_url'] = ''; $config['uri_protocol'] = 'REQUEST_URI'; $config['enable_query_strings'] = FALSE;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-18
    • 2011-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-03
    • 2019-05-15
    相关资源
    最近更新 更多