POST变量不发送:PHP /阿帕奇/ codeigniter [英] Post variables not sending : php / apache / codeigniter

查看:116
本文介绍了POST变量不发送:PHP /阿帕奇/ codeigniter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建在codeigniter一个应用程序的问题。在$ _POST变量没有工作,后续代码var_dump($ _ POST)返回阵列(0)

在网络环境中正常工作,所以它的本地主机的问题。

我认为它在Apache的conf或.htacces的conf,我将在这个项目中使用的.htacces。

任何帮助其真正AP preciated,谢谢。

 < IfModule mod_rewrite.c>RewriteEngine叙述在
的RewriteBase /的RewriteCond%{} REQUEST_FILENAME!-d
重写规则^(+)/ $ $ 1 [L,R = 301]的RewriteCond%{REQUEST_URI} ^系统。*
重写规则^(。*)$ /index.php/$1 [L]的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则^(。*)$的index.php / $ 1 [L]< / IfModule><!IfModule mod_rewrite.c>
    的ErrorDocument 404的index.php
< / IfModule>


解决方案

感谢下面的答案。但是它与Apache配置单一的问题。

在mod-rewrite模块被禁用,产生某种重定向与岗位的形式。我用命令 a2enmod重写启用它,一切工作就像一个魅力。

希望这可以帮助别人的未来。

I got a problem with an application built in codeigniter. The $_POST variables are not working, var_dump($_POST) returns array(0)

In online environment works fine, so it's localhost problem.

I think its the apache conf or the .htacces conf, I'm adding the .htacces used in this project.

Any help its really appreciated, thanks.

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

解决方案

Thanks for the answers below. However it was a single issue with the apache configuration.

The mod rewrite module was disabled, generating some kind of redirection with the post forms. I enabled it with the command a2enmod rewrite and everything worked like a charm.

Hope this helps someone in the future.

这篇关于POST变量不发送:PHP /阿帕奇/ codeigniter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆