1、strip_tags(string,allow)
2、
转编码
$getcontent = iconv(‘gb2312‘,‘utf-8‘,file_get_contents($url));
$getcontent = preg_replace( "@<head>(.*?)</head>@is", "", $getcontent );
$getcontent = preg_replace( "@<script(.*?)</script>@is", "", $getcontent );
$getcontent = preg_replace( "@<iframe(.*?)</iframe>@is", "", $getcontent );
$getcontent = preg_replace( "@<style(.*?)</style>@is", "", $getcontent );
$getcontent = preg_replace( "@<(.*?)>@is", "", $getcontent );
时间: 2024-11-05 18:59:55