1
有一个codeigniter的问题,并试图对它排序几个小时,似乎post vars没有被张贴,窗体工作我测试它使用作为test.php(print_r())在文件中的行动,和增值业务正在发布好,所以它的控制器没有按照它应该做的那样做。Codeigniter没有POST变量。
控制器:
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);'如果手动确保你有一个METHOD = “POST”在