main.php
这是主窗口
1<input onclick="test()" type="button" value="test"/>
1<script>
2function test() {
3open("test_pop.php"); // 弹出窗口
4var im = new Image();
5im.src = "test.php?v=abc"; // 传递信息
6}
7</script>
test_pop.php
显示通过im.src = "test.php?v=abc"; 传递的信息
1
2$filename = "test.txt";
3while(! file_exists($filename)) ;
4$ar = unserialize(join("",file($filename)));
5print_r($ar);
test.php
接受信息并保存于文件