是否可以将一些数据传递给PHP脚本,该脚本称为thru header('Location:')[关闭]

I have a PHP script which invokes another PHP script thru header("Location:"). Is it possible to pass some data to that second script, e.g. login name. That second script uses POST as its form's method. Currently I pass data thru file on server

As this basically just redirects the browser to the url specified in your Location header you can not simulate a POST request here. What you can do is to send GET-parameters with the requets.

For example you could do this:

<?php
header("Location: nextpage.php?login_name=".$login_name);

Then you would access this in the nextpage.php code with $_GET['login_name'].