【发布时间】:2013-03-04 08:48:33
【问题描述】:
(第一次发帖,所以如果我在一些礼仪、标记等方面有所偏离,请多多包涵:))
服务器端:
iframe-contents.php:
<?PHP
if($_POST['test-post-parameter'] == 'test-post-value'){
echo 'test-post-parameter successfully detected as "test-post-value".';
} else {
echo 'test-post-parameter either absent or of a different value than "test-post-value". :(';
}
?>
好的,假设我使用
请求 iframe 内容bash$ wget --post-data='test-post-parameter=test-post-value' -O - http://example.com/iframe-contents.php
结果是:
test-post-parameter successfully detected as "test-post-value".
但是,如果我要求它使用
`bash$ wget -O - http://example.com/iframe-contents.php`
我最终会得到:
test-post-parameter either absent or of a different value than "test-post-value
现在 - 假设我在服务器上有另一个文件,名为 index.html:
<html><head><title>PAGE_TITLE</title></head>
<body>
<iframe width="100%" height="100%" src="iframe-contents.php" />
</body>
如果我尝试在浏览器中输入http://example.com/index.html,我的标题栏中会出现PAGE_TITlE,正文中会出现test-post-parameter either absent or of a different value than "test-post-value". :(。
我的问题是:如何修改 iframe 元素以便获得?
test-post-parameter successfully detected as "test-post-value".
【问题讨论】: