Maison >développement back-end >tutoriel php > 字符串乱码解决思路
字符串乱码
<?php<br /> $url = 'http://luolai.tmall.com/search.htm?pageNum=1'; <br /> $lines_array = file($url); <br /> echo $lines_array; echo "<br/>"; <br /> <br /> $lines_string = implode('', $lines_array); <br /> eregi("<title>(.*)</title>", $lines_string, $head); <br /> echo "head:".$head; <br /> echo "<br/>"; print_r($head); <br /> echo "<br/>"; <br /> echo "title:".$head[1]; <br /> <br /> ?>