簡體   English   中英

codeigniter查詢字符串並一起分段

[英]codeigniter query string and segment together

在我的項目中,我需要查詢字符串功能和段數組功能。 因為一些返回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]

有什么方法可以只在任何特定頁面中設置查詢字符串格式嗎? 還是有什么辦法可以克服這個問題?

我已經找到了解決方案。 htaccess文件中沒有更改,但配置文件中有一些更改。 配置文件應為$ config ['base_url'] =''; $ config ['uri_protocol'] ='REQUEST_URI'; $ config ['enable_query_strings'] =否;

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM