I have an HTML POSTing form for the following index.php:
<?php require_once("/home/full/path/to/included/file.php"); ?>
And in file.php, I'm trying to access $ _POST:
ob_start();
session_start();
var_dump($_POST);
$contents = ob_get_contents();
ob_end_clean();
echo $contents;
But var_dump ($ _ POST) returns an empty array.
Moving ob functions to index.php has no effect.
If I put var_dump ($ _ POST) before ob_start (), OR, if I delete output buffering at all, the problem will disappear, but I need output buffering. Therefore, trying to track down the problem, I tried POSTing the form data on test.php:
ob_start();
$session_start;
var_dump($_POST);
$contents = ob_get_contents();
ob_end_clean();
echo $contents;
. , file.php, , , . ? $_POST script? ? .
EDIT:
:
HTML:
<form action="/" method="POST">
mod_rewrite index.php. action = "/index.php", , .