-1
$ text = file_get_contents(“http://127.0.0.1/name.php?name=Lary”);file_get_contents正在拾取所有代码而不是文本
我想用它来获取文本,而不是html。
$ text = file_get_contents(“http://127.0.0.1/name.php?name=Lary”);file_get_contents正在拾取所有代码而不是文本
我想用它来获取文本,而不是html。
试试这个我还没有测试过。
$html = file_get_contents("http://127.0.0.1/name.php?name=Lary");
$text = strip_tags($html);
echo ($text);
此处了解详情:strip_tags
https://pt.stackoverflow.com/ – David
我可以在40分钟内再次发布,因为你在这里,你能回答我的问题? –
什么是您的问题?你想要解决的问题具体是什么?解释细节。 – David