1

问题:我无法在任何地方获得任何 POST 变量。甚至不在 index.php 的顶部。这是因为 apache 重写规则吗?

这是我的 .htaccess 重写规则:

Options +FollowSymLinks
IndexIgnore */*
# Turn on the RewriteEngine
RewriteEngine On
#  Rules
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php

这使得一切都进入 index.php 我使用它作为我的控制器文件所以一切都首先通过 index.php

我需要哪些其他 apache 规则才能将 $_POST 数据获取到我的 index.php?

这是基本形式:

<form action="/signup" name="form_name" method="POST" id=""> 
<input type="text" name="field1" value="" /> 
<input type="text" name="field2" value="" /> 
<input type="submit" name="" value="Submit" /> 
</form> 
4

0 回答 0