Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/240.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 函数类似于get_meta_tags(),但用于字符串,而不是文件?_Php_Tags_Meta - Fatal编程技术网

Php 函数类似于get_meta_tags(),但用于字符串,而不是文件?

Php 函数类似于get_meta_tags(),但用于字符串,而不是文件?,php,tags,meta,Php,Tags,Meta,get\u meta\u tags()需要一个filename作为其参数。如果出于各种原因(例如,cURL),将HTML加载到$string中,并且需要从中提取元标记,该怎么办 是否有一种替代方法可以接受字符串?因此在这种情况下,您不能使用诸如file\u put\u contents和file\u get\u contents之类的函数?

get\u meta\u tags()
需要一个
filename
作为其参数。如果出于各种原因(例如,cURL),将HTML加载到
$string
中,并且需要从中提取元标记,该怎么办


是否有一种替代方法可以接受
字符串

因此在这种情况下,您不能使用诸如file\u put\u contents和file\u get\u contents之类的函数?