【发布时间】:2013-07-08 16:44:57
【问题描述】:
codeigniter 有问题并尝试对其进行排序数小时,似乎没有发布帖子变量,表单正在工作我使用文件中的 test.php (print_r()) 操作对其进行了测试,并且变量发布正常,所以它的控制器没有按应有的方式进行。
控制器:
print_r($_POST); //Nothing
print_r($this->input->post()); //Nothing
print_r($this->input->post(NULL, TRUE)); //Nothing
exit;
可能是 .htaccess 文件
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|uploads|img|images|frontcss|css|frontjs|js|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
感谢您的帮助
【问题讨论】:
-
您的控制器名称是什么?确保您的
.htaccess不包含任何控制器名称 -
您是在视图中手动编码 html 还是使用
form_open('name', '', $attrib );如果手动确保 -
-
如果您的帖子超过最大帖子大小,可能会发生这种情况:stackoverflow.com/questions/2733256/…
-
您的表单显示代码在哪里?
标签: php html forms codeigniter