获取<;p>;使用PHP get的id或类
我正在使用它,它允许在元标记“description”中显示url内容。它像这样使用php:获取<;p>;使用PHP get的id或类,php,javascript,jquery,ajax,get,Php,Javascript,Jquery,Ajax,Get,我正在使用它,它允许在元标记“description”中显示url内容。它像这样使用php: $tags = get_meta_tags($url); <label class="desc"> <?php echo @$tags['description']; ?> </label> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 然后这样称呼它
$tags = get_meta_tags($url);
<label class="desc">
<?php echo @$tags['description']; ?>
</label>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
然后这样称呼它:
$tags = get_meta_tags($url);
<label class="desc">
<?php echo @$tags['description']; ?>
</label>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
如何修改它以获取p、div、id、class的内容(纯文本)而不是元标记?p、div等中包含的内容与元数据不同。元数据是标题中的特殊内容,如下所示:
$tags = get_meta_tags($url);
<label class="desc">
<?php echo @$tags['description']; ?>
</label>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
这是
get_meta_tags()返回的唯一数据代码>功能。p、div等中包含的内容与元数据不同。元数据是标题中的特殊内容,如下所示:
$tags = get_meta_tags($url);
<label class="desc">
<?php echo @$tags['description']; ?>
</label>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
这是get_meta_tags()返回的唯一数据代码>函数。不,您不能修改此函数以获得所需内容,此函数用于元标记
您可以改为使用。不,您不能修改此函数以获得所需内容,此函数用于元标记
您可以改为使用。您可以获取文件内容,然后使用xmlreader解析内容
$rContent=file(“someHtmlFile.html”);
$content=join(“,$rContent”);
以下是指向XML阅读器文档的链接:
格里茨,
Lupo您可以获取文件内容,然后使用xmlreader解析内容
$rContent=file(“someHtmlFile.html”);
$content=join(“,$rContent”);
以下是指向XML阅读器文档的链接:
格里茨,
卢波