Home > Backend Development > PHP Tutorial > 急问关于数据传输有关问题,不使用重定向

急问关于数据传输有关问题,不使用重定向

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:12:55
Original
915 people have browsed it

急问关于数据传输问题,不使用重定向
php平台向java servlet 传输数据,但不使用重定向header,否则就到java页面了。请问怎样能够将数据发过去??


------解决方案--------------------
可用curl、fsockopen等方法实现
最简单的用file_get_contents($url); $url后面带上要传递的数据即可
------解决方案--------------------

探讨

test1.php 里面写: php file_get_contents("http://127.0.0.1/test/test.php?name=tom"); ?>

test.php 里面写 结果这个页面啥也没有啊
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template