我被困在工作上了。基本上我想要能够做file.php?ip=132.123.123.123&port=28005
基本上,我希望filegetcontent嵌入文本。

是我想要的(因为语法错误导致脱机显示,因为无法获得它在联机/离线纯文本中返回的时间)。
Print "<td>".file_get_contents("http://www.domain.com/status.php?ip=".$ip?port=.$port);" </td></tr>";它从数据库、ip和端口中获取,并在file.php?ip=132.123.123.123&port=28005上进行状态检查。
下面我得到了这个错误
[03-Jan-2014 03:46:14 UTC] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to udp://123.123.123.123?port=28035:0 (Failed to parse address "123.123.123.123?port=28035") in /home/*/public_html/servers/status.php on line 5行im使用
Print "<td>".file_get_contents("http://www.domain.me/servers/status.php?ip=".$info['ip']."?port=".$info['port']) ." </td></tr>";发布于 2014-01-03 01:30:07
您有多个引用问题和一个错误的分号:
Print "<td>".file_get_contents("http://www.domain.com/status.php?ip=".$ip?port=.$port);" </td></tr>";应该是
Print "<td>".file_get_contents("http://www.domain.com/status.php?ip=".$ip."?port=".$port) ." </td></tr>";一个像样的文本编辑器会发现引用问题,IDE也会发现分号问题。
至于创建表,这将取决于从file_get_contents()返回的数据的格式。对该数据执行一个var_dump(),并查看它的格式,这样您就可以计划如何处理生成表的方法。
$data = file_get_contents("http://www.domain.com/status.php?ip=".$ip."?port=".$port);
var_dump($data);https://stackoverflow.com/questions/20895010
复制相似问题